How to move local WordPress site to hosting server

If you want to create a website, the best way is to start developing the site on your local PC server and save money on the hosting during the development phase. Once you are finished with the development of the site, you can then move your site over to a live server. In this article we will explain how you can do this.


  • WordPress Site on a local server like, WAMP or MAMP with full access, i.e to the database and all the files of the site.
  • Web Hosting that supports WordPress Sites and provides FTP access to the site.
  • Database Manager like, Adminer or PHPMyAdmin and knowledge of how to use it. We would be using Adminer for the screenshot examples for this article.
  • FTP Client like FileZilla.
  • Note down where on the site absolute paths are used. These would later be needed to change to the live server specific path.

Move local WordPress Site to Server

Step 1 : Export the local WordPress Database

  •  Open ‘Adminer‘ and select the WordPress Database.
  •  Export and save the database as a CSV or SQL file.





 Step 2: Correct URL paths

  • Open the exported database file in any text editor that has a ‘search and replace‘ feature.
  • Run a search and replace on the database file and replace the local url with that of your domain.

Edit : This step might break any serialized data for a plugin. To avoid any such problem we suggest using one of the many ‘Search and Replace’ plugins available.





Step 3 : Upload WordPress files to server

  • Using a FTP client access your hosting server and search for a directory named ‘public_html‘ or ‘www‘ (name may vary depending on your hosting company).
  • Copy all your WordPress files from local website directory to the live server website directory.




Step 4 : Import the Database file to the server

  • Open the Site Database on your server using ‘Adminer‘. If the server does not have a database already for the new site, you will have to create one.
  • Select the Database and press “Import” button placed on the left sidebar for ‘Adminer’.
  • Upload the SQL/CSV file of the local site to the Server database.





Step 5 : Edit ‘wp-config.php’

  • Using a FTP client again open the ‘wp-config.php’ file from the site files you transferred to the server.
  • In this file you have to edit the following 3 lines :

define(‘DB_NAME’, ‘your_database_name’);
define(‘DB_USER’, ‘your_database_user’);
define(‘DB_PASSWORD’, ‘your_database_password’);




That’s all, hopefully your live site will now be up and running. Check your site to make sure that every thing is working fine as expected.

3 Replies to “How to move local WordPress site to hosting server”

  1. Hi, your step 2 above will brake any serialized data, like in widgets acf fields and so in. Insted – use a search and replace tool that will allow replacements in serialized data. Google for WordPress search and replace. InterconnectIT is a good option!

  2. I have been exploring for a little for any high quality
    articles or blog posts in this kind of area . Exploring in Yahoo I ultimately stumbled upon this website.

    Studying this info So i am glad to convey that I have a very
    excellent uncanny feeling I discovered exactly what I needed.
    I so much surely will make certain to don?t overlook this web site and give it
    a glance regularly.

Leave a Reply

Your email address will not be published. Required fields are marked *