Many times, your clients already have a website when they come to you. They want a new site, but they want to keep their old site online until the new site is ready. This means you need to build their site somewhere else. As a developer, I run into this a lot, and often have 3-4 site builds happening at one time. To keep things running smoothly, I’ve set up multiple sandboxes for WordPress development.
What is a Sandbox Site?
Basically, a WordPress sandbox is an extra WordPress instance set up on a subdomain or subdirectory of an existing URL, or, a URL you use for nothing but development.
Where Should I Put my WordPress Sandbox?
Good question! If you’re like me and you build sites all the time, it would pay to set up some sandboxes on one of your own domains. This way, no matter who needs a site, you can build it out on your end and share the URL with them. When the project is over, you can recycle the sandbox for the next project.
If you’re not planning to do this all the time, you can just build your sandbox on the client’s domain at something like clientdomain.com/sandbox.
Furthermore, if this is a new site, or if the client is moving to a new host, you can often set up the site where it will eventually live, and just use a test URL or an IP provided by the host. When you have the site complete, you simply point the domain away from the old host and to the new one via updated nameservers.
Setting Up a WordPress Sandbox
Depending on the type of hosting you use, the steps for setting up a sandbox may vary. We’ll start with the most popular method and work our way out.
If you have hosting with a cpanel dashboard:
Login to your hosting account. When you get to the cpanel dashboard (which is covered in icons), scroll down to find Simple Scripts or Web Applications and look for the WordPress logo. Click on that, and the install wizard will begin! One of the first questions it will ask you is where you want to install WordPress. By default, it will be one of the URLs you already have on your hosting account. Select one of these, and just underneath it should be a place to add a directory such as /sandbox; so that the install path looks something like domain.com/sandbox.
Continue with the wizard to set up your username and password, admin email address, site name, etc. Agree to the terms, then click Install. This may take a few minutes, but when you’re done, you have a sandbox to play on!
If you do not have a cpanel dashboard:
Hosts without a cpanel dashboard are normally very simple and come without all the bells and whistles (like install wizards). In such cases, you will need to know how to create a database on your host.
Once you have created a database, and a database user for the database, download the WordPress core files from WordPress.org. Extract the files on your computer, then connect to your host via FTP (instructions below). Create a subdirectory in under the URL of your choosing and upload the WordPress files to it.
Next, right click on the wp-config-sample.php file and choose to rename it. Rename to wp-config.php.
Right click again, and select view/edit. This will download the file to your computer’s temporary files directory, and open it in a plain text editor. Once open, find the lines for Database Name, Database User, and Database Password. Enter the corresponding information from your database setup.
You will also need your hostname, which is provided by your hosting company and usually found in the database setup wizard or the host dashboard.
Scroll down to the section about Authentication Unique Keys and Salts. Copy and paste the URL from those instructions into a new browser window and load the page. When the unique keys are returned, copy and paste into your wp-config.php file where instructed. Save the file. Filezilla should then prompt you to upload the updated file.
After the file is updated, go to the URL of your sandbox and follow the instructions for install, setting up your site name, username, password and email address.
Where Are My WordPress Files for My Sandbox?
You can access the new install’s files via the File Manager in your host’s cpanel, but you can’t really do much with them from there. I suggest you use an FTP client like Filezilla to locate and manage the files on your host’s server.
Once you’re logged into your account, find the domain you’ve installed the sandbox on. When you see the sandbox directory, double-click to open it. This is where all the theme, plugin, and uploads files for your sandbox are stored, completely separate from the files used for your main site in the directory above the sandbox!
My WordPress Sandbox Is Set Up. Now What?
Now you play! Upload and install as many themes and plugins as you’d like. Build the site. Add content. Configure widgets and menus! When you’re all done, use FTP to download the plugins, themes, and uploads directories from the sandbox/wp-content folder to your computer. Then connect via FTP to the new site and upload these same folders. Then export your sandbox’s database via phpMyAdmin in your sandbox’s cpanel. Import the database to the new site, and it will turn on all needed themes and plugins for you!
GoDaddy Managed WordPress is built from the ground up for maximum performance, security and ease of use. Click here to experience the difference.