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.phpand 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.phpalso the credentials forDB_NAME,DB_USERandDB_PASSWORD.
(don’t forget the$table_prefixif you changed that also with your new credentials). -
Edit your downloaded
*.sqlfile 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_USERandDB_PASSWORD.
(don’t forget the$table_prefixif you changed that also!) with your new credentials.
(Do a search for http://yourdomain.com in that*.sqlfile) -
Edit windows
hostsfile (C:\Windows\System32\drivers\etc), add a new line with
127.0.0.1 local.yoursite.com -
Import now the changed
*.sqlfile into phpMyAdmin -
Pray and open browser, type
local.yoursite.comif all went okay it should work flawless.
When all went okay you can now add/edit local and still access live without any hasle.