Transferring WordPress from localhost to live web server

Posted: 09 November 2013, Category: WordPress

Every time I create WordPress website I always use localhost as I find it the best solution when developing WordPress website as updating changes on live web server is so time consuming.

But migrating WordPress from localhost to live web server can be tricky and I always have to look into my notes to make sure I do everything right.

There is plenty of tutorials on web telling you how to achieve this task but no set way to do it right. This post as you can assume from post title describe the method I've found the most efficient when deploying WordPress website from localhost to live web server.


List of programs needed to complete this task:

  • phpMyAdmin
  • text editor
  • Filezilla

Couple of simple steps to successfully transfer WordPress from localhost to live web server are as follows:

  1. Go to local phpMyAdmin, select database you want to export and click Export tab.
  2. Save database in convenient location in SQL format.
  3. Open the .sql file in your favorite text editor (Notepad++ in my case) and do search for localhost this will help you to find the localhost URL.
  4. Find the string you need to replace such as http://localhost/example where example is name of my WordPress folder.
  5. Run search and replace http://localhost/example with your domain name such as
  6. Save as (make a copy) updated file in UTF-8 format just in case you need to go back and make more changes.
  7. Login to your web server cPanel and in phpMyAdmin section create new database and user for this database.
  8. Once database is created import updated .sql file
  9. Next step is to upload WordPress files from localhost to live web server using Filezilla or any similar FTP program.
  10. Once upload is done open wp-config.php and update database name, database user and database password with details related to database created on live server.
  11. If you decided to set permalinks, your last step is is to login to the WordPress admin section and navigate to settings-> permalinks and click save changes button. This will reset permalinks to new URL.

I hope this short tutorial will help you to successfully transfer your local WordPress copy to live server without single error message.

Please feel free to contact me if you have any comments or suggestions.

Back to Blog page

Blog categories

Twitter feed

(17 days ago)
Thanks to paul morris for making this photo available freely on @unsplash 🎁

(21 days ago)
Great article about Variable Scope in Modern JavaScript by @drmonkeyninja

(21 days ago)
A Native Lazy Load for the Web via @css

(22 days ago)
Best Practices For Mobile Form Design via @smashingmag

Top of page