Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
25 Million+
Websites using our plugins
Years of WordPress experience
WordPress tutorials
by experts

Moving a WordPress Installation from Local Server to a Live Site

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

After spending some time with WordPress on your local server, you finally decide to move it to a live website. However, it seems like you don’t know what your next step should be. This tutorial will take you through the steps necessary to move your local WordPress installation to your live website.

Before taking on this task, it is essential that you already have a domain and a web host. We have written an article on what to look for in a web host and tips for picking the best domain for your blog. The theme used in this tutorial was made by Indeziner and released by Smashing Magazine.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

27 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Fajri says

    I found the guide extremely user-friendly.

    The step-by-step instructions made a potentially complex process feel manageable, even for someone like me who isn’t very careful about the tech behind my website since from the beginning i am focused on the content

    Thanks a lot!

  3. darrenth says

    Have you ever tried uploading to a temporary url? Do you then change the web url and blog url to point to the temp url instead of the domain name?

    • wpbeginner says

       @darrenth Yes, you would have to. Often when working on bigger projects what happens is that you upload on a subdomain, then use .htaccess to point the main domain to that subdomain and make it look like that everything is on the main domain. A little complex, but that is what we do when working with larger clients.

  4. MarkKeylon says

    Thank you very much. I just followed your procedure to load my dev site onto my hosted site <a href=”>Best Forex Trading Signals</a> and for the most part, worked like a charm. The only problem I had was that even though I did the whole search and replace thing, there were still some links that I had to convert manually. Among them, custom menu links. I’m not sure if I did something wrong, but it wasn’t too bad to tweak it to finish it afterwards. Thank you.

  5. wpbeginner says

    @harwood.wilson6 Yes, you may need to change the media path for that if you find images broken. Glad we were able to help.

  6. harwood.wilson6 says

    @wpbeginner Wow, that was an easy fix thanks for the help. The next thing I am going to do is track down some of the pictures that are broken.

  7. wpbeginner says

    @harwood.wilson6 Make sure the pages exist in the wp-admin panel. If they do, then go to Settings > Permalinks page, and just click Save. Leave everything as is.

  8. harwood.wilson6 says

    @wpbeginner @harwood.wilson6 i am getting the 404 page not found error. Normally I would just make sure pages are on the server but since wordpress uses php it is a bit different. Please check out the site at My goal is to get the site on the root folder eventually. Thanks for any help.

  9. wpbeginner says

    @harwood.wilson6 don’t know without really looking at your site. What error are you getting?

  10. harwood.wilson6 says

    All of my pages broke when I uploaded the site. The homepage works but everything else is missing from the server. Does anyone know where I may have made this fatal error?

  11. jiri says

    What about setting up a blog on localhost and latching it onto a subdomain wordpress installation on a server. is that possible?

  12. Vijay39 says

    Great post, I almost stumbled on the last task where the database had to be imported. I tried to overwrite an existing databas and that was my error. A NEW DATABASE must be created in MySQL and the local database imported into this empty database.

    Very helpful & clear! Thank you very much!

  13. Linda says

    Thanks Adeline and “Editorial Staff” – I did manage to find my way back in by editing the URL in the local database.

    So I’ve got it up and going again, THANKS!!

    Again, great video – very helpful.

  14. Adeline says

    This video was great and I was successful in moving a local WP to a web server.


    I had the same issue with mine and I found the WP Codex useful.

    Check out:

    Make sure you back up your database.

    “Add these two lines to your wp-config.php, where “” is the NEW location of your site.


    This worked out fine for me.

  15. Linda says

    Hi there, thanks so much for this clear video explanation of how to move the local site to a live server.

    I would like to gain access to my local site again, but before I exported my database I followed the instructions and changed the domain location in Settings > General. So now, of course, the domain points to the live site.

    I can’t figure out where I go to change those URLs back again on my local site. Thanks for your help on this!

  16. ebflute says

    In the post and in custom fields the URL that I hard coded says something like http://localhost/wordpress/wp-content/uploads/myimagefile.jpg

    but my new URL should be

    Do I need to go in after I move the site and change each one of the URLs by hand in the posts and pages?

    or is there a way to use relative URLs in custom fields and posts, I know I cannot use somethign like “TEMPLATEPATH” . because I can’t write PHP in my posts…

    • Editorial Staff says

      You can simply edit it using the MySQL query. Go to your phpMyAdmin and select your database. Click the button SQL

      update wp_postmeta set meta_value =

      Make sure you make a backup first. This will replace everything in that value. Meta


  17. ebflute says

    How do you handle images that have absolute URLs in the blog? Can you edit the export file before importing it?

    • Editorial Staff says

      Do you mean you want to replace the URLs of the image to point to something else?

      If they are all with the same domain and you are switching, then its just a simple query away.


Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.