Learn about Centmin Mod LEMP Stack today
Register Now

Wordpress Installing 2 wordpress websites under the same VHOST

Discussion in 'Blogs & CMS usage' started by cr0, Mar 14, 2018.

  1. cr0

    cr0 Member

    38
    2
    8
    Aug 21, 2017
    Ratings:
    +2
    Local Time:
    9:01 AM
    Hey and thank you for passing by! This community definitely changed in the good way :) @eva2000 is still working hard, I appreciate your work!!!

    I'm trying to setup 2 different themes, one is for the mainpage (SHOP) and the second one is for BLOG (because one or other has great features that I'd like to use).

    Now the challenge is: Create 2 wordpress websites under the same vhost. One under /blog and the other is @. How is it possible? I'm trying out this guide: Wordpress - centmin.sh menu option 22 - How to switch Wordpress to subdirectory

    Also. I know that it's possible to share database entries for users and their posts, but is it possible to share the items in the cart?

    Here's what I'm going to use to share database entries in wp-config.php of /blog website:
    Where "wpblog_" is the table prefix for BLOG.
    And "wp_" is a prefix for the main page.

    Code:
    $table_prefix  = 'wpblog_';
    define('CUSTOM_USER_TABLE', 'wp_users');
    define('CUSTOM_USER_META_TABLE', 'wp_usermeta');
    
    Thank you!
     
  2. eva2000

    eva2000 Administrator Staff Member

    34,598
    7,653
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,770
    Local Time:
    5:01 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    no idea i tend to avoid configs like these as makes moving sites to separate servers harder down the track

    for wordpress technical side maybe better to ask at WordPress Development Stack Exchange
     
..