Lately, I’ve been tinkering with my site a bit more than usual. Playing with those dangerous files under the hood and driving myself and probably everyone else crazy.
I’ve broken my site several times and thankfully learned how to bring it back up again all by myself.
Today I learned how to set up a testing site for my blog, and I was really amazed by just how EASY it was. I had Googled my little heart out to find a tutorial for setting up a test site for my blog and honestly, I came up empty-handed.
Today, I headed out to the bookstore and found this book:
WordPress All-in-One For Dummies
This IS available in Kindle format.
But that would be a HORRIBLE idea.
For the process of setting up a test site for my blog, I flip-flopped throughout the entire book from front to back…this would not be easy in an e-reader (but I do love my Kindle!). This book is about 4 inches tall.
It’s an enormous book, but it contains a TON of awesome information.
I digress though, let’s set you up with a test site for your blog!
Set Up A Test Site for your WordPress Blog
Difficulty: Medium
Time: Several hours. Most of it you can walk away from, but be sure to copy down where you are at in the process so you don’t get confused.
Requires knowing how to use your FTP client.
WARNING: You can absolutely positively screw up your entire site by messing with these files. If you do EXACTLY what I say, you won’t actually be modifying anything on your actual site. However, if you mess up and delete something or hit the wrong key…permanent type stuff can happen.
I recommend backing up your site before you get started and making sure the backup is successful. Once you have your backup…you should proceed with caution. I’m not trying to scare you.
IN FACT, by helping you set up a test site for your blog, I’m trying to empower you.
With a test site you can start trying to learn how to modify and alter your site through trial and error, which in my opinion, is the best way to learn. I’m not going to lie though, if you don’t know how to do much more than write a post and hit publish (and there is NO shame in that), you probably shouldn’t attempt this.
Note: This tutorial is long and it is involved. I recommend scanning it through before you start. That said, it’s one of those things that you might not fully understand until you are following along with it. Step by step. I might try and make it available as a printable PDF if anyone is interested. Tell me in the comments if you are interested.
Finally, I take no responsibility if you blow up your blog. I went so far as to double check this tutorial by setting up a SECOND testing site (which I don’t need) to ensure this tutorial would work. It works. If it doesn’t work for you, I’m so sorry but I can’t take responsibility. Okay…let’s go!
Part 1 of setting up a test site for your blog: Setting up the subdomain & creating your MySQL database
Step 1: First you’ll need to log into your CPanel where you host your site. I host my site through WiredTree (I love it there!).
Step 2: Now you’ll scroll down until you see Subdomains icon. Click on it.(note: You might find yourself stopped in your tracks right here. Not all hosting companies offer subdomains. If you don’t see this icon, contact them. They might be able to set you up from their end, or unfortunately, they might let you know it’s simply not possible. In which case, you COULD just buy a random domain name, and start this tutorial with installing wordpress. It’s more convenient though if you can just use a subdomain.)
Step 3: On this next screen, you’ll name your subdomain. Just type in what you want to call your subdomain.
Next to Domain Root, choose the name of the domain you want to assign your subdomain to in the drop down box (if you only have one blog hosted, it will be the only option in the drop down for you).
Step 4: Click Create
Step 5: Now you are going to go back to the home screen of your CPanel and scroll down to MySQL Databases
Step 6: Click MySQL Database. On the next screen, enter a name for your new database (Jot this down under Database Name somewhere)
Step 7: Now go down to MySQL Users on the MySQL Databases page. Choose a username and password. (Jot these down under Username and Password) Click Create User.
Step 8: A Message will appear to let you know you were successful. Click Go Back.
Step 9: In the drop down under Add Users to Databases, choose the user you just set up and in the database drop down list, choose the database you just created. You’ll be taken to a new screen. Assign ALL Privileges to the user (you). Click Make Changes. Go back.
Part 2 of setting up a test site for your blog: Installing WordPress via FTP
Step 1: Now you’ll need to install wordpress onto your subdomain. To do this, you’ll need to log into your FTP client. I use Filezilla.
Step 2: Log into your FTP (you’ll need your host {which is a bunch of numbers. Example: 111.111.111.111}, your username and your password…if you don’t know your host name you can ask your hosting provider. You were given this info at installation though and you should also be able to find it in your cpanel)
Step 4: Click on Public HTML and choose your testing domain from the dropdown. Yours should be empty right now.
Step 5: Go here and download the latest version of WordPress onto your computer. Once it’s downloaded, extract the files (not sure how? For me, in Google Chrome, I do the following: 1. Show in folder 2. Right click on file and choose Extract All Files 3. Designate the folder I want the files to end up in)
Step 6: In your FTP client, you’ll now grab the files in the FOLDER (not the whole folder) and upload those to your testing folder. (this takes a bit…there’s a lot to upload!)
Part 3 of setting up a test site for your blog: Getting WordPress Up & Running
Step 1: Now, in your browser, go to your test blog’s url. So if you called your test blog “testing123.myblogname.com”, type that in.
Step 2: You’ll be shown a screen that tells gives you the option to create a configuration file. Click that button.
Step 3: Click the Let’s Go button at the bottom of the page.
Step 4: Now you’ll need to pull out the info you jotted down earlier:
:: Database Name: The name you used when you created your MySQL database earlier. You might need to add your name as a combination of your username and the database name separated with an underscore (_). (I did)
:: User Name: This is the username you just created earlier just prior to creating your database.
:: Password: Use the password you used when you set up your MySQL database.
:: Database host: I was able to leave it as localhost. If that doesn’t work, you’ll need to contact your hosting company.
:: Table Prefix: Left as wp_
Step 5: Click Submit.
Step 6: Click to install WordPress.
Step 7: Site Title is what you want your testing site for your blog to be called.
Username is whatever you want to use as your WordPress login (don’t use admin for security reasons).
Password is whatever password you want.
Email is…well I’ll let you figure that out 😉
Allow your blog to appear in search engines? I’d rather my test blog NOT be indexed…so I unchecked this box.
Step 8: Click the Install button.
Step 9: When it’s done you’ll get an email to log in. Go for it! You did it! Dance like Dora!
(Possibly OPTIONAL) Part 4 of Setting Up A Test Site for Your Blog: Exporting/Importing Your Blog Content
FYI…here’s where things get a bit tricky. If you have a blog with any decent amount of content…it’s going to be BIG. I’ll tell you what I did, but I’m not convinced this is the correct or easy way to do it. If you find an easier way, please tell me in the comments!
***It dawned on me AFTER I did this whole thing that you probably don’t HAVE to do this step. You might want all your pages on your test site, but you really have no need to have all your posts on there.
It does also bring over your navigational menus and some other important items (specifically: “This will contain all of your posts, pages, comments, custom fields, terms, navigation menus and custom posts”), so you’ll have to decide for yourself.
Honestly on my second go round, I tried to skip this step and it didn’t work out. So I went back and did it and was once again successful. So I’m going to go ahead and say DO IT…but it you are smarter than me and you can figure out how to NOT do it…well that’s okay too 😉 .
Step 1: Go into your MAIN BLOG. The blog you are making a testing site for.
Step 2: Scroll down to Tools in your dashboard and choose Export.
Step 3: Choose to Export ALL CONTENT
Step 4: You’ll have an XML file downloaded to your computer.
Step 5: Here’s where things get tricky. My file was huge. WordPress’s importer will only import files 8MB or smaller so I had to find a way to make my XML file smaller so I could upload the files to my testing site. I downloaded this free program here that I found by searching the WordPress.org forums. It worked well and split my huge XML file into…wait for it…17 files.
SO yes, I had to import each file in separately.
If you want to do it my way, head on over here and download WXRSplitter. Once the program is downloaded, use it to split your XML file. Hopefully you have less files than I do! You can attempt to make them into 8MB chunks, but I had read in my googling that people were having issues importing anything over 2MB, so I made mine all 2MB.
Move the resulting files into an easy to find folder on your computer and head on over to your TEST BLOG now.
Step 6: Go down to Tools and Click Import. Now you are going to import each file one at a time. Be sure you don’t try to import your large file…it simply won’t work.
Choose WordPress:
The first screen you’ll see will ask if you want to assign new authors to the posts made by unregistered users. I ignored all of this. You are being asked this because the authors of the posts you are importing are not users on your test blog. There’s no need for them to be, so just ignore it.
I also did not check Download and Import File Attachments.
I just clicked Submit. For every file, that’s all I did on this page. Clicked submit.
Give it a bit and you’ll come to a screen that probably looks a bit alarming. Filled with a bunch of warnings that items failed to upload.
Don’t let it alarm you. Remember you are uploading bits and pieces of your site…it will eventually all end up up over there.
Step 7: When you finish…take a look at your site (it’s also fun to watch it as you upload the smaller files. It’s cool to see it slowly taking shape!)! You aren’t done yet though.
Part 5 of Setting Up A Test Site for Your Blog: Bringing in your Pictures, Theme and Plugins
Step 1: We’ve only brought in our content so far. We still need to bring over our theme files, our media files and our plugin files.
Step 2: Let’s go back to our FTP Client and log in once again (if you aren’t still logged in).
Step 3: Go into your main blog’s files and you’ll want to download the following files (they will all be under public_html->wp-content):
/wp-content/uploads
/wp-content/plugins
/wp-content/themes
Just an FYI…these can take a LONG time. Specifically the uploads file if you have a lot of media files on your site (which I did). You might choose not to upload the media file onto your site. It’s up to you.
Then you get to do the whole thing again in the next step (when you upload the downloaded files onto your testing blog). This is probably the most time-consuming but minimally hands on portion of this whole process.
Step 4: Once these are downloaded, go BACK into your testing blog in FTP and upload these files to the correct folder (wp-content). Since you installed a fresh WordPress install in there…you’ll get a warning that you already have some of the files and do you want to override them?
Yes you do. And to prevent having to do this a million times, you’ll need to tell it to Always Use This Action and I’d suggest also checking Apply To This Que Only because you likely don’t want that to be the default for your FTP client in the future.
Step 5: Now it’s just a matter of going into your test blog and setting things live. Everything you uploaded won’t be activated, so you’ll have to activate your theme, your menus and your plugins. In addition, any settings that you put into your theme (font size/color/etc) will need to be set by you on your test blog as well. This is a great time to play with different colors and fonts…since you are now on your TEST blog!
A few things to be aware of:
- Your widgets won’t be in place. If you want to set up a true testing environment, you’ll want to make your test blog as similar to your real blog as possible. So maneuver your widgets to be as identical as possible to your main blog.
- Likewise, you’ll realize that some plugins and widgets require steps (api keys, can only be installed on one site, etc) that are unnecessary for a test blog. In that case, you can make place holders. For instance, for a 300×250 ad sense ad, just create a colored square and write “Ad Sense Ad 300×250” in it. Upload it to your site as media and use HTML to put the picture in the appropriate widget (like the picture below):
- This is a testing environment. Which means that breaking stuff is okay! Remember, you can wipe this baby clean and re-install wordpress and your site files at any time. This should encourage you to try things that you probably wouldn’t try out otherwise!
I broke my testing blog when I started turning on my plugins. I got sick of turning them on one by one, so I turned them all on at once. BIG scary mistake!
Or it would have been if it was on my actual website. Since it was on my test blog, it was simply time to learn.
I ended up finding out that you can actually disable ALL your plugins via FTP by just renaming the plugin file “plugins.hold”. Then I was able to go in and one by one delete plugins until I figured out the problem. It was awesome!
I know this is LONG. And I know it seems like a ton of work. It will be SO worth it though. I’m so excited to play with my new test blog!