WordPress From Local to Live

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!)

[unordered_list style=”bullet”]

[/unordered_list]

So let’s get started!

Requirements:

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:
[ordered_list style=”decimal”]

  1. Make sure your site host supports WordPress.

    Most do, but if you are unsure, contact your provider.

  2. 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)

  3. FTP access to your live site.

  4. Ability to access a .php file in your site’s *root folder from your browser.

    – or – a “public_html” folder on your server.

[/ordered_list]

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.

[toggle title_open=”Close” title_closed=”Don’t worry!”  hide=”yes” border=”yes” style=”default” excerpt_length=”0″ read_more_text=”Read More” read_less_text=”Read Less” include_excerpt_html=”no”]It is not some malicious, dark plan I have to take over your website. It is just a test file that displays the below text when directed to from your browser. If you still don’t trust me, download the file and open it in a text editor and take a look. There is nothing going on in there.[/toggle]

[button link=”http://davidvhughes.com/wp-content/freebies/test_this.zip” size=”small” color=”orange”]Download Test File[/button]

[unordered_list style=”bullet”]

  • 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:
     http://yourdomainname/test_this.php[/unordered_list]

 

If successful, the above steps should produce the following in your browser:

[box type=”note” icon=”none”]

test_this_screenie

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.

[/box]

 

 

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.

To do this, Justin Junda from freeducate explains the steps in this comprehensive youtube vid.

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.

When you are ready to go live with your fantastic site, come back here and I will spare you the horror of what I went through, by showing you a quick and easy solution with a WordPress plug-in.

 

 

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:

[unordered_list style=”bullet”]

  • 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.

[/unordered_list]

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.

Duplicator For WordPress: Series 001 – Quick Overview from Cory Lamle on Vimeo.

 

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.

After that….

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.

DONE!

Not that difficult, right?

You now have a live website to show off. I really hope that this post was helpful.

[toggle title_open=”Close” title_closed=”What does LOCAL mean?” hide=”yes” border=”yes” style=”default” excerpt_length=”0″ read_more_text=”Read More” read_less_text=”Read Less” include_excerpt_html=”no”]”Local” means that you will create your website on your computer, but no one without acces to your machine will be able to see it. You can tweak it all you want until you are ready to make it publicly viewable. Just like saving an email as a draft, and not sending until your are finished editing.[/toggle]

[toggle title_open=”Ok, I got it. Close” title_closed=”and LIVE?” hide=”yes” border=”yes” style=”default” excerpt_length=”0″ read_more_text=”Read More” read_less_text=”Read Less” include_excerpt_html=”no”]”Live” simply means your website is on a public server. (One that either you or your company pays to rent space on.) It is viewable to pretty much anyone with an internet connection. Just like the site you are viewing right now.[/toggle]

[toggle title_open=”Close” title_closed=”What the heck is a Root Folder?” hide=”yes” border=”yes” style=”default” excerpt_length=”0″ read_more_text=”Read More” read_less_text=”Read Less” include_excerpt_html=”no”]The Root Folder is basically the main container that holds all of your sites folders. So you should upload the file in here. Not inside any other folder.[/toggle]

If you spot any flaws, omissions or want to let me know how this worked for you….I would truly appreciate your comments. Thanks.

 

4 Comments

Join the discussion and tell us your opinion.

zuteoreply
April 12, 2013 at 12:22 am

Hi David,

I’m new to WordPress and all this localhost stuff. After hosting your localhost ‘live’, could I still edit my pages and entries on ‘live mode’ itself? Or do I have to go back to localhost to do all that and then re-host it live?

I only went through all the localhost procedure to install a theme that I got for wordpress… D:

dvhughesreply
April 12, 2013 at 12:48 am
– In reply to: zuteo

Hey zuteo,
Yes, of course. You can edit everything live. However, since you now have essentially two copies of your website now…one local, one live, it is up to you to keep them synched if you choose to do so.

zuteoreply
April 12, 2013 at 1:16 am
– In reply to: dvhughes

Hi David,

Glad to hear that I can edit everything on live mode.

I’m currently stuck at the Duplicator step. Mine doesn’t show what is shown in the video at 1:35…

http://imageshack.us/photo/my-images/845/screenshot20130412at711.png/

dvhughesreply
April 12, 2013 at 10:47 am
– In reply to: zuteo

That is what it looked like on mine when I did it. It’s fine. Just put your MySQL info in the appropriate fields, check the “table removal” box and run it.
Just make sure you are deploying the most recent version of your site.

Reply to zuteo Cancel reply

This website uses cookies. By continuing to use this site, you accept our use of cookies.