• I would like to have 2 sites with identical content and different themes running from same database.

    On adding a post, it should be updated on both the sites should have updated that post although with a different link.

    I read older articles on this – https://wordpress.org/support/topic/two-sites-two-themes-one-database-same-content

    According to the thread, it is mentioned that I have to do this –

    In the second sites directory do the following:

    In the wp-settings.php file change the options database value to something like this:

    // Table names
    $wpdb->posts = $table_prefix . 'posts';
    $wpdb->users = $table_prefix . 'users';
    $wpdb->categories = $table_prefix . 'categories';
    $wpdb->post2cat = $table_prefix . 'post2cat';
    $wpdb->comments = $table_prefix . 'comments';
    $wpdb->links = $table_prefix . 'links';
    $wpdb->linkcategories = $table_prefix . 'linkcategories';
    $wpdb->options = 'YOURNEWPREFIX_options';
    $wpdb->postmeta = $table_prefix . 'postmeta';
    $wpdb->usermeta = $table_prefix . 'usermeta';
    
    $wpdb->prefix = $table_prefix;

    See how I’ve removed $table_prefix . in the options line?
    Instead of YOURNEWPREFIX put something like ‘site2’ or whatever you want.

    But I did not find this code in the wp-settings.php file

    Please advise and help

Viewing 4 replies - 1 through 4 (of 4 total)
  • I would like to have 2 sites with identical content

    Are you aware that search engines will penalize both sites for duplicate content?

    Thread Starter kmoksha

    (@kmoksha)

    Wp Yogi,

    you said “Are you aware that search engines will penalize both sites for duplicate content?”

    Our sites are not dependent on search engines. So, that is not an issue.

    So, what is the solution for what I am asking ?

    Okay, cool, I’ll move this thread to the Hacks forum – the people who help out there will likely know how you can do that. Sorry, I don’t :(.

    Thread Starter kmoksha

    (@kmoksha)

    WPyogi,

    I saw previous questions of the same issue in the How To forum, that is why I put it in there.

    Will it not be better in there since this forum has very low people responding ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to have two sites with same content, diff themes running from one database’ is closed to new replies.