Moving your WordPress site from local to live can be a tricky proposition.
With all of the outdated or incomplete tutorials out there about moving your wordpress site from local to live, I decided to put together the sources that worked for me. I will explain to you what is needed to set up your mac computer to create your wordpress site locally, and then advise you on how to move your *local site to a *live server. It would have saved me hours of frustration, not to mention valuable time, if I had a comprehensive list of quality resources in one place, start to finish.
*If needed, there are some plain spoken definitions of terms at the bottom of this page.*
It is in two distinct parts: (You can skip ahead, but read the requirements!)
So let’s get started!
First off, and very importantly, go no further until you have tested to see if this method will work for you. I mean it! Why waste your time? I already did enough of that for you.
You will need several things confirmed:
Make sure your site host supports WordPress.
Most do, but if you are unsure, contact your provider.
You will also need all of the MySQL login info your site host sent to you.
Should be in an email. (host, database name, user, password)
FTP access to your live site.
Ability to access a .php file in your site’s *root folder from your browser.
– or – a “public_html” folder on your server.
To test to see if you can access a .php file from your browser, I have made a very simple .php file that you can upload via FTP to your site and test it out.
- Download this small 4kb file
- unzip it
- upload “test_this.php” via FTP to your site’s *root folder
- type the following into you browser’s address field:
If successful, the above steps should produce the following in your browser:
If you can see this on your browser after uploading the file to your root folder, then you are good to go. If not, then you should stop reading this tutorial and search elsewhere for help. Sorry.
Be sure to delete this file from your root folder regardless of the result.
To set up and start creating your wordpress site locally.
The first thing you will need to do is download a copy of MAMP and install it on your MAC computer. (If you have a PC, you need to download WAMP)
You can grab your free copy of MAMP from the application’s website, right here.
For an easy to follow video tutorial on how to install MAMP on your machine,
Addison Berry from drupalize.me has a really great screencast:
(The fact that this is a drupal tutorial and we are working with WordPress makes no difference this early in the process.)
After you have installed MAMP on your machine, you will then need to install WordPress on your computer.
Justin gets into some scary talk about site security with WordPress in this video. Especially from the 7:25 point to 8:40. But since you will be working locally, or – not actually on the web, you do not have to worry too much about this at this point.
However, if you have all of your MySQL info handy, you can use that information to fill out these fields now, You will be doing it again when you take your site live, so keep that info close.
Also, when he talks about setting the “table prfefix” at 9:44, you can go ahead and change that to something different. It’s good advice. (You need the underscore “_” after your rename.)
So to be clear, you can follow his tutorial from start to finish and all security issues will be rectified before going live.
OK, thats it for the first part.
You are now ready to start creating your WordPress site locally. Go nuts and no one but you will see it.
Moving your local WordPress site to a live server.
Ok….If you have uploaded the “test_this.php” file to your root folder and successfully navigated to the file in your browser, then you are ready to go. (Please delete this file if if have not already.)
The only additional thing you will need is the MySQL login info your site host sent you mentioned at the top of this post.
I would imagine that since you have been building or built your site with WordPress, that you may already have some knowledge about plug-ins and their installation and use. But I guess I should not assume that, so I won’t.
The first step you will need to do is install the free “Duplicator” plug-in into your WordPress site. This plug-in saved my ass, and I am very grateful for it.
To achieve this:
- Click on the “Plugins” in the lower left side of your WordPress panel.
- At the top of the next main page, click “Add New”
- In the search box type: “Duplicator” (It should be the top hit.)
- Click on “Install Now” directly under the name.
You can also add this plug-in to your site by downloading Duplicator directly form their site, lifeinthegrid.com, and then dragging it into your wp-content/plugins folder.
Then just follow this tutorial from the duplicator site, and I will help you out with something that screwed me up a little after following this tut.
The part about database names and passwords at 1:20 is where you want to type in your MySQL info. This takes care of the security issues Justin was talking about in the video above.
I would highly recommend creating a new folder on your desktop and naming it something like “MySite_For_Upload” or something distinctive and then when downloading your duplicator packages, saving them to this new folder.
Upload both the “installer.php” and “…package.zip” to your root folder via FTP to your website. Just like you did with “test_this.php” in the earlier step.
Open a new browser window and type in: http://yourdomainname/installer.php
Follow the steps in the above video, including filling in the same MySQL info that you did before, and you should be all set.
Your password to log in to your now live wordpress admin dashboard is the same one you just used in the duplicator installer.
Not that difficult, right?
You now have a live website to show off. I really hope that this post was helpful.
If you spot any flaws, omissions or want to let me know how this worked for you….I would truly appreciate your comments. Thanks.