How to Migrate a Local Site to WordPress and Transfer It to a Hosting Account

Many times, you’ll find yourself in the situation where you have to migrate a local site to WordPress. Maybe you are working with an amateur web designer who doesn’t have much experience. Or, it could be that the site was built on a program like SquareSpace or Flywheel, which have pretty dull import tools. In either case, you’ll end up with an unfinished site that you’ll have to finish and import to WordPress. In this tutorial, we will teach you how to migrate a local site to WordPress and transfer it to a hosting account. The whole process will only take you about an hour, and you’ll be able to enjoy your new site.

The Biggest Hurdle

The first step is to identify the biggest hurdle. For some, it will be importing the content from the site to the new installation. For others, it will be converting the HTML to XHTML, setting up the permalinks, and figuring out where all the images are going to go. However, the biggest hurdle is going to be the configuration of the WordPress installation itself. When you migrate a site that is already set up, you’ll just have to connect the database to the new WordPress installation and then configure it to work with the existing content.

Make Sure You Have Everything

The next step is to make sure that you have everything. You don’t want to be scrambling to find a link to a PDF file or a video six months from now because the person who was supposed to host it hasn’t uploaded it yet. When you’re in the middle of a web design project and you realize that you don’t have the necessary tools to complete it, it’s frustrating. To avoid this, create a folder on your desktop with all the necessary files in it. Back up your old site’s files in case something happens to them during the process. This is also important if you’re doing this to a completely blank site (no content at all), in case you run into trouble (like I did when I tried to install the Fresh Web Hosting Plan and missed out on a few critical files).

Create A Backup Of The Old Site

As we’ve established, backing up is extremely important, so create a backup of the old site before starting the process. This will help you avoid a lot of trouble and will spare you the effort of restoring the site from scratch if something happens. If you start feeling a little overwhelmed, don’t worry- it’s normal. Just keep in mind what you’re getting into and that with every step, you’re a little closer to becoming a successful web designer.

Prepare Your Local Machine

The last step before you start the process is to prepare your local machine. Make sure that you have the latest version of WordPress installed on it. Also, make sure that you have the necessary tools to handle the conversion of files (like WinRar, 7-Zip, or, if you’re on a Mac, the built-in zip tool). If you’re using a PC, you might also want to consider upgrading the BIOS to the latest version as well (if your motherboard is more than five years old, it may have started displaying issues related to speed and stability).

Now that you’ve prepared your local machine, you’re ready to start the process. Just click on the button below to get started.

The Import Process

The first step is to log into your WordPress dashboard and click on the Tools button. From there, you’ll see a list of options. Click on Settings and you’ll see a screen that looks like this:

As you can see, we already have a database connected to our WordPress installation. If you click on the DB icon, you’ll see this screen:

Here we can select which database to use for our new site. Make sure that you choose the correct database- if you’re using the same one from the old site, all your entries will be overwritten (which is why we made a backup before starting). Now click on the Tools button to bring up the import tool.

The next screen will look like this:

Here you’ll see a list of all the documents and images from the old site. You can click on any of these files to see their details. You’ll see something like this:

From here, you can click on the button to import the file. Make sure that you click on the “Choose File” button to select the file you want to import and then on the “Import” button to begin the process.

Depending on what filetype you’re importing, this could take a while. When the process is done, you’ll see a screen like this:

Here we can see that the importer has replaced all the text on the page with a message informing us that the import was successful. To verify, we can click on the button below the message to see the site as it was before we imported it.

As you can see, the import was successful and the text and image files we uploaded during setup were replaced with the equivalent files from the old site. However, that doesn’t mean that everything is perfect, as you’ll soon see.

The Cleanup Process

When we export a site to WordPress, we usually end up with a bunch of files that weren’t needed for the import. These are the same files that were created when the page was initially setup (like CSS and JavaScript files). To remove them, you can either trash them or download a clean WordPress install (from and import it. While the later may seem like an overkill, it’s important to keep in mind that all these files are potentially dangerous. Having them on your computer may cause issues if you have a virus infection or a malware outbreak (especially if you’re hosting them on a free service like Google Drive or Dropbox). So, while your computer may not seem infected, it’s never a bad idea to clean it out once in a while.

How To Migrate A Local Site To WordPress

To get started, simply connect your local machine to the internet (via wifi or ethernet), then open a web browser and navigate to http://yourdomainname. You’ll see a screen like this:

The above screen shows the home page of our test site. Just keep in mind that if this is the first time you’ve seen this site, it will have to build its database of users and posts from scratch. In the Settings menu, click on the “Site Name” and type in a new site name for your new WordPress installation. This is the name you’ll use to access your new site in the blog section of WordPress (e.g., http://yourdomainname/blog).

Once you’ve entered a new site name, you can click on the Create Password button to create a password for your new site. This is important for securing your new WordPress installation. When you’re finished, click on the Create Account button to create a new account for your new site. This account will be used to access your new WordPress installation and to send emails from (e.g., username@yourdomainname).

To import a site to WordPress, you’ll need to click on the Tools button and then select Import from another site in the menu that appears. You’ll then be presented with a screen that looks like this:

Here you can see that we already have a WordPress installation on our local machine. However, it is currently offline, as you can see by the red slash through the button. To connect it to our database, we’ll need to do a few things first. First, we’ll need to create a new database for WordPress. If you navigate to the WordPress directory on your computer, you’ll see a database called wp_db. We’ll need to create a new database and give it the same name. To do this, click on the DB icon and then the New button to create a new database. Once the database has been created, click on the Edit button to enter the WordPress database settings. In the left column, change the “Database server” to HOSTGUID, which is the IP or server name of your computer. As you can see above, we’ve also changed the name of the database to MyBlog. Next, we’ll need to activate the WordPress plugin Installer. To do this, click on the Plugins button and then the Installer tab. Enabling the plugin Installer will allow us to install new plugins and updates to WordPress on our site.