Skip to content

How to migrate WordPress from localhost to a Hosting

26 September, 2018
How to migrate WordPress from localhost to a Hosting.

In this post you will see how to migrate WordPress from localhost to a Hosting, step by step, without complications, and very well explained. ENTERS!



WordPress It is undoubtedly the most widely used free software for blog and community management.

It is too easy to use and has many tools that can greatly facilitate the creation of a blog, business website, etc.

For this reason, many first do some tests and create their websites on local servers where no one can see their progress and when they finish, they upload them to a website.

But what happens when they finish and want to upload that website to a domain, but without having to do everything from scratch?

Today we show you how to migrate WordPress from localhost to a Hosting. Join us!


How to migrate WordPress from localhost to a Hosting

If you want to migrate WordPress from localhost to a Hosting, follow the steps that we will present below.

You have to bear in mind that you must already have your Hosting contracted and ready to use; also have finished your project on your local server.

Edit the URL from localhost to that of the domain

1.- Enter your WordPress administration panel (eg:

2.- Then, go to «Settings> General» (located in the left menu).

3.- Once inside the page, modify the sections «WordPress address (URL)" Y "Site address (URL)«, Inserting the URL of the website where WordPress will be displayed for the public.

4.- Go to the bottom of the page and click on "Save changes."

Export the Database

The database It contains all the settings, entries, pages, users, etc ... This step is necessary to be able to migrate WordPress from localhost to a Hosting.

5.- Go to your local server database manager (eg: [where you actually have your manager!]), Then select your WordPress database.

6.- Locate the "Export" button and click on it.

7.- Select the «SQL» option.

8.- Then, select the option «Compressed with GZIP«.

We recommend you:  How to increase free space on partitioned hard drives

9.- Then click on «Continue».

11.- When the file has been downloaded, save it where you know (because it is the one that will be used to import the database to the Hosting).


Upload WordPress files to FTP server

Now, the next step to migrate WordPress from localhost to a Hosting is to upload all the WordPress files to the FTP server:

12.- Go to your FTP server of your Hosting and log in to it.

13.- Enter the folder «public_html» (or the root folder of your web Hosting).

14.- Locate the WordPress files from your local server and upload them to the Hosting through the FTP server.

Import WordPress Database to Database Server

15.- Now, enter the administration panel of your Hosting.

16.- Look for the "SQL" or "Databases" section.

17.- Create a new database.

18.- Then, create a user for your database with all the necessary permissions (that is: username and password).

19.- Afterwards, go to the database manager of your Hosting and click on the database you created.

20.- Click on «Import».

21.- Locate the file that you exported from your WordPress and select it.

22.- Select the «SQL» format and import the file.


Making final adjustments to migrate WordPress from localhost to Hosting

23.- Now, go back to the FTP server and locate the file «wp-config.php» of your WordPress (eg: public_html / wp-config.php).

24.- Modify that file: locate the functions «DB_NAME», «DB_USER», «DB_PASSWORD» and «DB_HOST» and edit them; putting the corresponding values in each section, to establish connection with the database.

25.- READY !: Now you can visit your website and your WordPress will look the same, but now, everyone can see it.

IF YOU DIDN'T UNDERSTAND THE STEPS, I leave you the original video that I consulted:

Before finishing this post, I want to tell you that this blog is written ALL about WordPress: plugins, themes, tips, optimization, tutorials, etc ... Surely there will be something that interests you to read!

In the same way, we write tech tutorials of all kinds: hardware, games, programs, tips, etc ... Visit us!

Were you able to migrate WordPress from localhost to a Hosting? Tell us your answer in the comment box of this piece of post!

See you in a next post.