Hello Laura,
You are correct that WordPress does have a restriction when it comes to creating a multisite network with subdirectories on websites that are older than 30 days due to issues with existing permalinks. The url to some of the pages on your site might be changed and cannot be accessed by you users.
Before making any changes, make sure to back up your website. This is a precaution in case something goes wrong.
However, there is a way to work around this restriction and set up a multisite network with subdirectories even for an older site. Add the following line to your wp-config.php file before setting up the network.
define('SUBDOMAIN_INSTALL', false);
This line forces WordPress to use subdirectories instead of subdomains for the multisite network
Let me know if you have further questions!
Thread Starter
lauratu
(@lauratlovestotravel)
Hello, thank you for your response. When I add this line to the wp.config file (between the custom lines and “That’s all”), I immediately get a database error. Did I do something wrong? Thank you in advance for any help you can give me.
Kind regards, Laura
Hello Laura,
One possible issue could be that if the WordPress installation was initially set up as a multisite network using subdomains, the necessary database tables would have been created specifically for that configuration. Switching to subdirectories by setting SUBDOMAIN_INSTALL to false may cause errors because the required tables for subdirectory-based sites might not be present.
To check if the correct tables exist, look for tables such as wp_site, wp_blogs, and additional site-specific tables like wp_2_posts in your database.
I recommend trying this setup first on a staging server to avoid potential issues on your live site. You can refer to this guide as a reference.
Thread Starter
lauratu
(@lauratlovestotravel)
Hello,
Thank you for your response.
It seems like the wordpress installation is indeed set up as a subdomain multisite network, because when I tried to set up the multisite network earlier this week, it said I only had the subdomain option. At this point I cancelled setting up the network and asked for help here. Now, when I open up the ‘set up network’ through ‘Tools’ in my dashboard I get the following error:
Waarschuwing: Een bestaande WordPress netwerk was gevonden. Graag de configuratiestappen afronden. Om een nieuw netwerk aan te maken moet je de netwerkdatabasetabellen leegmaken of verwijderen.
Which translates to:
Warning: an existing WordPress network was found. Please finish the configuration. To create a new network you must delete or clear the network database tables.
So, if I’m understanding this correctly: if I want to use the work-around (change subdomain to false), I either finish the configuration first, or I delete/clear the network database tables (I found wp_site and wp_blogs inside my database).
Kind regards, Laura
Hello Laura,
You are correct, I suggest completing the Existing subdomain multisite setup First
- If you complete the current configuration as a subdomain network, you can then modify the
wp-config.php file to use sub directories.
- Once the network is set up, you can change the setting from subdomains to sub directories by setting
SUBDOMAIN_INSTALL to false
- After updating the file, you need to adjust your server configuration (e.g.,
.htaccess for Apache or Nginx rules) to handle sub directory-based multisite URLs.
Thread Starter
lauratu
(@lauratlovestotravel)
Hello,
Thank you so much for your reply. I think it worked! I have created a multisite network with subdirectories and just created a /nl extension. The task at hand is creating all pages and post on my current website again, but in Dutch. The lay-out etc must eventually look the same as on the original site. Is there a way to copy my content: child theme/post/pages/lay-out from the original website to the /nl website so I can replace the English version with a Dutch one?
Kind regards, Laura
Hello Laura,
I’m glad to hear the subdirectory setup worked for you! Here are a few tips to help set up your child theme and migrate content across subsites.
Using the Child Theme Across Subsites
- In the Network Admin dashboard, go to My Sites > Network Admin > Themes and enable the child theme for your multisite network.
- Once enabled, go to each subsite’s dashboard under Appearance > Themes and activate the child theme individually.
Import Theme Settings (If Needed)
- If your child theme includes specific customizer settings or theme options, you might need to replicate these manually for each subsite.
Use WordPress Export/Import Tool
- To copy content like pages, posts, and media:
- Go to Tools > Export on the main site, select “All Content,” and download the XML file.
- On the
/nl site, go to Tools > Import, install the WordPress importer, and upload the XML file.
Some plugins can help export settings, data, and themes from the main site and import them into a target subsite. However, there isn’t a one-size-fits-all solution—you may need to try different plugins to find one that meets your specific needs.