How to add a WordPress Demo Site

If you are converting an existing WordPress install then please disable all plugins and backup your database and files.

Step 1: Modify WP-Config.php

FTP to your website (for us it’s and make a backup copy of wp-config.php in case something goes wrong. We usually make a copy and name the backups wp-config.php.bkup. Feel free to do the same or use your own naming convention.

Next, download wp-config.php found in the root of your WordPress install. Open the file in your favorite source code editor and look for the line /* That’s all, stop editing! Happy blogging. */ and add an empty line just before it.

Place this code into your file:
define('WP_ALLOW_MULTISITE', true);

Your file should look like the image below.
build wordpress test site

The line of code you added into wp-config.php instructs WordPress to enable the Network Administration panel and prep the network install process.

Now, save the file and upload it back to your website.

Step 2: Enable & Configure WordPress Networks

Go to the Admin dashboard and click on Tools -> Network Setup
wordpress test site

The next screen you see needs to be filled in carefully. As I mentioned at the beginning of this tutorial, we’re going to be creating a WordPress test site on a sub-domain using sub-directories.

Take a look at the image below to see that I selected “Sub-directories” and entered values for the “Network Title” and “Admin E-mail Address.”
wordpress test site

Once you have everything filled out, click on the “install” button.

Step 3: Enabling the Network

At this point WordPress works some magic under the covers and then presents you with a screen containing instructions informing you that the next steps involve editing your .htaccess file and your wp-config.php file once again. As suggested by WordPress, it’s always best to make a backup of your files before making the edits. The image below details the next steps to enabling the network on WordPress.

wordpress test site

To be clear, the code you add to your wp-config.php file will be placed immediately following the one line of code you entered in step 1 of this process.

Once you made your changes to .htaccess and wp-config.php you will need to save the files and upload them back to your web server. Next, you will need to log back into WordPress as they kick you out when making this change. At this point you should now see that you have successfully created a WordPress test site that’s perfect for theme developers showcasing their themes or for developers to build test sites for clients.

To confirm that everything worked as planned, your dashboard should now include “My Sites” in the two areas seen below in the image below.
wordpress my sites


source via : How to Build a Test WordPress Site

Scroll To Top