How do you set up WordPress Multi-Domain?
With just a few lines of code, you can set up WordPress to support multiple domains. This means you can manage several websites within a single WordPress installation. So, if you have several websites, you don’t have to log in again and again; you can simply switch between them within the CMS. That’s certainly handy.
Efficient and high quality
Technical management is also a lot easier, as you only need to update all themes and plugins once. If, like SEO Ninja, you develop your own themes and plugins, a multi-domain environment ensures much greater efficiency and quality. Changes take effect immediately across all websites within the applications. On the one hand, this is a strength, but on the other, it can also be a weakness if testing isn’t carried out with sufficient care.
Domains, subdomains and subfolders
When setting up a multi-domain configuration, you can choose between domain names and subdomains or subfolders.
For domain names, for example, you can seoninja.proand seoninja.deset up. For subdomains, you can www.seoninja.pro or test.Set up seoninja.pro; for subfolders, you can use seoninja.pro/nl or seoninja.pro/de design. The final choice therefore depends on what is best for the client.
What do you need to change in WordPress?
Open the file in the hosting environment wp-config.php. Before the line /* That's all, stop editing! Happy blogging. */ Insert the following code:
<code>define( 'WP_ALLOW_MULTISITE', true );</code>Save the file and go to the following in WordPress: Tools > Network Setup (or Tools > Network Settings). Follow the steps. Then choose whether you want to configure the multi-domain feature for (sub)domains or subfolders, and install the whole thing. WordPress will then tell you which changes you need to make to the .htaccess-file. and a few extra lines in the wp-config.php. Once you’ve saved the changes, you’re all set. You’ll know you’ve installed multi-domain correctly if you see ‘My Sites’ in the top-left corner of WordPress. This allows you to switch between websites.
If, for whatever reason, you are unable to log in to the WordPress environment for the new website, you are experiencing an issue with cookies. In that case, please add the following line to wp-config.php:
<code>define('COOKIE_DOMAIN', $_SERVER['HTTP_HOST'] );</code>Managing themes and plugins differently
In a multi-domain WordPress installation, the way themes, plugins and users are managed changes. You can now set, for each website, which themes are active on it, which plugins you do or do not want to use, and who is authorised to manage the website. This means you can create a website that runs on a different theme and even uses different plugins. The possibilities here are endless.
Want more customers from Google?
I'll take a no-obligation look at the growth opportunities for your site — no sales talk, just concrete wins.
Keep reading
- Blog
Here’s how to carry out a good keyword analysis
You want to rank higher on Google, but where do you start? People use Google every day to find answers to […]
· 4 min 
Sterkste Schakel 2021: TuineXtra wins ‘Best Website’
On Friday 16 April 2021, we had the pleasure of presenting the ‘Best Website’ award to the winner, TuineXtra from Noordwijk, from […]
· 1 min- Blog
SEO challenge: Merging several multilingual websites
A client wanted to merge three multilingual online shops, each with a different domain extension, into a single domain name. How do you go about doing something like that? On the […]
· 3 min