• haleks

    (@aleksandrhaiko)


    Hi!
    There are three independent sites with their databases and domains. It is necessary to organize their administration through a multisite in the subfolder mode. The core set of plugins is the same. Two of them also use the same custom theme. So the goal is justified)
    The main issue with databases. I assume that we can first replace the table prefixes for two sites with wp_2_ and wp3_, and then export these tables to the main database. However, there is a problem with media files, because for each site a subfolder will be created in uploads folder and the file paths should break. Is there any way to get around this problem?

    • This topic was modified 2 years, 10 months ago by James Huff. Reason: moved to Networking WordPress since this is a multisite question
Viewing 2 replies - 1 through 2 (of 2 total)
  • Gloria Hooks

    (@gloriahooksofficial)

    To set up a multisite in subfolder mode for three independent sites with separate databases and domains, you can follow these steps:

    1. Install and configure WordPress multisite: Enable multisite functionality in your WordPress installation by adding the necessary code to your wp-config.php and .htaccess files, as instructed in the official WordPress documentation.
    2. Modify table prefixes: Update the table prefixes for the two sites using a plugin like “WP-CLI” or by directly accessing the database. Change the table prefixes to wp_2_ and wp_3_ for the respective sites.
    3. Export and import tables: Export the tables for the two sites with modified prefixes from their respective databases. Import these tables into the main database using a tool like phpMyAdmin or WP-CLI.
    4. Update media file paths: Since each site will have a subfolder in the uploads directory, you need to update the file paths. Use a search and replace tool, like “Better Search Replace” plugin, to replace the old file paths with the new ones. This ensures that media files remain accessible after the migration.
    5. Verify site functionality: Test the functionality of all three sites within the multisite setup. Ensure that the media files are loading correctly and that the custom themes and plugins are functioning as expected.

    By following these steps, you should be able to set up a multisite with subfolder mode for the three independent sites. Remember to backup your databases and files before making any changes to ensure you can revert if needed.

    Thread Starter haleks

    (@aleksandrhaiko)

    Gloria Hooks  Thanks! I will try to do it!

    • This reply was modified 2 years, 9 months ago by haleks.
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘multisite for existing sites’ is closed to new replies.