September 3, 2015 | Technical

Move your live WordPress site to your Computer

I can think of two situations when you would want to move your live WordPress site to your computer. The first could be that you are developing a custom theme and you want to develop it with access to your real site content. The second maybe that you want to update a theme on your live site and want to make edits locally. In this post I’m going to go into the step by step process for one to move their live WordPress site to their Computer.

Set Parmalinks to Default Settings

In your WordPress admin panel for your site go to Settings > Parmalinks and set Common Settings to “Default” and ensure that all other fields are empty. If you skip this step you will not be able access your site’s admin panel on your local computer.

Retrieve your Site’s Database

Go to the control panel for whichever service your are using to host your WordPress site and click on phpMyAdmin. Select your site’s database and export it. Your export page may look like this. Use the default settings to export the database. You can edit your Parmalinks setting back to what they were if desired on the live site after the database has been exported.

Database export page for phpMyAdmin

Download wp-content Folder

In your hosting service’s control panel find the file manager for your site and click on it. Find the wp-content folder and compress it. After you compress it then you can proceed to download it. Your file manager may look something like this.

Wordpress file manager on hosting control panel

Working with MAMP

MAMP allows you to have a server installed on your computer on which you can locally launch websites. It supports WordPress installs as well. Once MAMP is installed, launch it and start the servers. We will begin by first creating the database for the local instance of the site. From the MAMP window, launch the WebStart page and click on phpMyAdmin. Go to Database > Create database and type the name of your database and hit Create. I named my database “rabia_site_5”.

Creating a new database on MAMP

Next select your newly created database in the left sidebar. We will now import the database downloaded earlier from the live site.  Go to the Import tab, choose the database file to import and click Go with the default settings as seen below. Upon successful import you should see a message like “Import has been successfully finished” in green.

Importing the database

Navigate to the htdocs folder within your MAMP installation and create a new folder. This will be the local location of the site. I called mine “rabia_site_5”. Download and unpack a fresh WordPress release and place it’s content within this folder. With the WordPress content unpacked replace the wp-content folder with the one that we downloaded from the live site.

Now we need to modify some database configurations related to the location of the site. Select the wp-options field within the newly created database in phpMyAdmin and click Browse. Update the siteurl and home fields to the local location of the site. Depending on your setup it may look like http://localhost:8888/ with the folder name of your WordPress install appended to it. See my updated fields below.

Updating wp-options fields

Installing WordPress

You can launch the new WordPress site from MAMP’s WebStart page by going to My Website in the top navigation and clicking on the name of the folder where we placed the fresh WordPress install. We will now be guided through the installation process for WordPress. Use the below configuration settings for the database however using the name for your own database.

Updating wp-options fields

Once the installation process is complete you will have a fully functional local version of your site on your computer.


return to top