Transferring WordPress To Local Environment

September 8, 2014 617 views


I've successfully gone through the process of setting the LAMP and then a Wordpress website.

I want to now transfer the wordpress i have on the IP provided to a local environment to work on.

  1. I have exported the database found on the IP address using phpmyadmin.
  2. Imported the database locally.
  3. I've downloaded the wordpress files using FTP.

locally, I've moved the index.html to a separate folder so it loads the index.php first.
when i try to navigate to the wp-admin side on my local enviroment, it points to the IP address wp-admin, how can i change this so it goes to my local admin page.

This- > <iP>/wp-login.php?redirect_to=http%3A%2F%2Flocalhost%2FWordPress%2Fwp-admin%2F&reauth=1

I Want -> localhost/WordPress/wp-login/

Digital Ocean Enviroment : Ubuntu 14.04
Local Enviroment: Ubuntu 14.04

1 Answer

On the copy of the database that you imported locally go to your local phpmyadmin and under the wp-options table find the row that says siteurl and change it to localhost instead of the IP address.

Once is done you can go to localhost/Wordpress/wp-login
login and change under general settings the second field to match localhost

Have another answer? Share your knowledge.