Here a – quick and dirty way – to get ‘live to local’ with wamp.
Assuming that you access your live site as in http://yoursite.com
Steps to take:
- Copy your live site as you did, public_html to www
-
Edit
wp-config.php
and add folowing 2 lines code:define( 'WP_SITEURL', 'http://local.yoursite.com' ); define( 'WP_HOME', 'http://local.yoursite.com' );
IF these lines already exist change them by adding
local.
as shown (with the dot). -
Change in
wp-config.php
also the credentials forDB_NAME
,DB_USER
andDB_PASSWORD
.
(don’t forget the$table_prefix
if you changed that also with your new credentials). -
Edit your downloaded
*.sql
file and make the changes, meaning by
that just add local.
in front of the domain name (every time you find that url) and change also:
DB_NAME
,DB_USER
andDB_PASSWORD
.
(don’t forget the$table_prefix
if you changed that also!) with your new credentials.
(Do a search for http://yourdomain.com in that*.sql
file) -
Edit windows
hosts
file (C:\Windows\System32\drivers\etc), add a new line with
127.0.0.1 local.yoursite.com
-
Import now the changed
*.sql
file into phpMyAdmin -
Pray and open browser, type
local.yoursite.com
if all went okay it should work flawless.
When all went okay you can now add/edit local and still access live without any hasle.