It is always a good idea to develop your website locally as it is fast and easy to fix if you cause an error. The last thing you would want is to have your live site go down. That is why setting up a local install of WordPress is a good idea. This tutorial teaches you how to move WordPress from local server to live site. This includes all of your work that you have done locally and will ensure it looks exactly how it should online.

When you have finished developing your site, you will want to move it to your hosting provider so the world can access your creation. This guide will walk you through how to manually transfer your local WordPress install to your live website. Although there are faster methods by using plugins, we will show you how to transfer WordPress manually.

In this tutorial we will be transferring the site manually from local server to live site to show you how it is done. There are simpler options by using a plugin instead.

The best plugins to transfer your site are WP Migrate DB Pro, Duplicator and BackupBuddy. We personally use WP Migrate DB Pro as it is so much quicker with one-click migration.

What to do before you start?

Before we begin migrating, we will assume you have a local WordPress install setup on your Mac or Windows computer. If you do not then you should stop reading this guide and follow our guide on how to install WordPress on your computer first.

You will also need a domain name and a hosting server setup and ready to use. If you do not have hosting or a domain name then you can read our article on how to choose the right WordPress hosting for your website.

In most cases, if you are just beginning then we recommend Bluehost as they offer affordable website hosting and domain names. If you want hosting with a lot more power then WP Engine is the hosting for you.

Make sure you follow our guide on how to install WordPress on your hosting server if you have just purchased your website hosting and domain name.

Finally, you will need to have an FTP application on your computer. You use the FTP application to connect to your server and transfer the files to it. We use the FTP application called Transmit but all FTP applications will be similar and Filezilla is a free alternative.

Once you have the local install, your hosting server and and FTP application ready then it is time to begin transferring your website to the live server.

Exporting your local install

The first step is to export your local WordPress database. A local database is created on your computer when you use server software such as MAMP, WampServer or XAMPP applications. You may be using other software but the process is very similar. You will need to make sure your local server software is running on your computer to access your database.

[latest_deal length=”full”]

Upload WordPress Files to Live Server

The next part of the process is to upload all of the WordPress files to the live hosting server. To do this, you will need to connect to your hosting server using your File Transfer Protocol (FTP) application.

If you do not have a preferred FTP application, you can download Filezilla. It is a free FTP application that works on all computers.

For this tutorial we will be using Filezilla.
Note: Make sure you follow the install steps closely. One of the install windows will ask to set yahoo as the default search engine and new tab window in your browser. You may not want that. If you don’t, just select “No, thanks”.

Setup MySQL Database
The next part requires you to log into your hosting server and create a new database. Once the database is created, you will be importing the SQL file you exported from your local install.

Update Live WordPress Configuration

Now that you have updated your site URLs, you will be able to visit your site and see some progress. Though not what you are specifically after. You will see an error message saying that it is unable to connect to your database.

To fix this, you need to update the wp-config.php file on your server to point to your new newly setup database on your live server in the previous step. This section of the tutorial shows you how to update your configuration file so that it can connect to your database.

Before you begin this step, you will need to make sure your files have finished copying to your server in your FTP application. If the files have finished copying to your server then you can proceed.

That is all that is required to get your website online though there is one final piece to the puzzle which is fixing links and media still referring to your localhost.

Fixing Broken links and media files not displaying
When you access your site, you will find that your media is not displaying correctly and the URLs that you created for your site still go to your localhost – not your live site. This is because your site is still referencing your localhost URL for media and links in the database.

To fix this, you can either add a plugin to search and replace every record in your database or you can do it manually by running a SQL query in phpMyAdmin on your server.

If you choose to use a plugin then we recommend using Better Search and Replace. It creates a Better Search Replace sub-menu in the Tools sidebar that allows you to search for your localhost URL and then replace it with your live websites URL.

If you would like to do this manually then you can follow the below steps.

Congratulations on transferring your local WordPress site on your computer to your live site online! Hopefully all of the steps made sense and you were successfully able to transfer your site without any issues.

If you find yourself doing this on a regular basis then it would be a smart idea to use a plugin like BackupBuddy or WP Migrate DB Pro to do all of the heavy lifting for you. They will save you a lot of time as you will be able to do the above steps in less than half the time.

Did you find this guide on how to move WordPress from your localhost to live site helpful? Let us know if you need a hand with any parts in the comments below.

Also make sure you join us on our YouTube channel for video WordPress tutorials. You can also keep up to date with our latest tutorials on our Facebook page.