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.

 WordPress

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 http://www.josefzacek.com.
  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

(5 days ago)
Preparing for General Data Protection Regulation (GDPR) https://t.co/RS2J7YN7pJ via @driftingruby


(15 days ago)
ActiveRecord Tricks https://t.co/n5TfzS9s1Q via @driftingruby


(15 days ago)
Optimize your images and encode it in base64 https://t.co/e59VyAwp6B via @redpik


(20 days ago)
Great day at Classic Motorbikes show in Carlow. Well done to organizers for all effort #carlow https://t.co/cbZVUTRnBg


Top of page