How To Build a WordPress Test Site

It’s easier than you think to build a WordPress demo site or as others call it, a WordPress test site.

Today’s WordPress tutorial will demonstrate the steps necessary to create a new OR convert an existing standard WordPress website into a network of sites by using the multi-site feature. By the end of this tutorial you will have created a WordPress multi-site network that will allow you to run a collection of websites that all share the same WordPress installation.

The reasons to build a WordPress test site can vary. Several reasons include:

  1. WordPress design agencies might want to build a client’s website on a public accessible server
  2. WordPress theme builders might want to showcase their premium WordPress themes on a sub-domain using sub-directories
  3. WordPress plugin builders might be testing a new piece of functionality on their latest version
  4. the reasons go on…

For this particular WordPress tutorial we’ll be providing information on how to build a WordPress test site on a sub-domain using sub-directories. We’ll cover the steps necessary to build your test website using URLs as demonstrated below.

  • http://demo.rvamedia.com
  • http://demo.rvamedia.com/theme1
  • http://demo.rvamedia.com/theme2
  • http://demo.rvamedia.com/theme3

OK, lets get started!

Minimum Requirements

WordPress 3.0 or higher is required.

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 demo.rvamedia.com) 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

Comments

  1. John says

    Do you have a seperate installation of wordpress on the “demo” folder and thats where you installedd the multisite or is the main wp installation in the root ?

    • Rick R. Duncan says

      The ‘demo’ website is a sub-domain and it has WordPress installed in the root.

      -rd