This is what I did:

  1. Copy all files in public_html to C:\wamp\www\mylocalsite.com
  2. Export my database and rename all http://mylivesite.com to http://localhost/mylocalsite.com of exported .sql file using notepad++
  3. Change database name, database username and database password in wp-config.php to my new database name, username and password that I created in my local phpmyadmin

All done with no error. When I try to login using mylivesite.com login data, but it failed with no error notification.

My question is there any easy solution for me so then I can login to my localsite admin dashboard successfully?

  • I did try: reset password in database with MD5 dropdown option, but login still failed
    – assal0le
    Mar 5, 2016 at 1:55
  • Assuming you see the login page? (wp-login.php)..is the (local) site visible, did you think about the path...it seems you moved from root to sub-folder.. you add(changed) that also in the db? Maybe you find here some help. Btw wamp means Microsoft OS... did you add the site also in the host file? (windows/system32/drivers/etc/) Or is that localhost part in the last given url a mistake?
    – Charles
    Mar 5, 2016 at 2:05
  • Hello @Charles thanks for your fast reply, Yes I can see wp-login.php login page, but the (local) site is not visible. It said 'The requested URL not found..' maybe it is because of plugins. Actually this is the reason why I need to login to my local site admin dashboard in order to disable all plugin thx
    – assal0le
    Mar 5, 2016 at 2:46
  • A very quick response, which probably not solves login but ..anyway...rename the plugins folder and plugins are disabled. Should I make an answer with a 'dirty' workaround about copy to local and work without too many changes with MS/Wamp and your information?
    – Charles
    Mar 5, 2016 at 2:49
  • Hello @Charles I did rename the plugins folder and yes it is not the one that make my login failed thx
    – assal0le
    Mar 5, 2016 at 3:31

1 Answer 1


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 for DB_NAME, DB_USER and DB_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:
    (don't forget the $table_prefix if you changed that also!) with your new credentials.
    (Do a search for http://yourdomain.com in that *.sqlfile)

  • Edit windows hosts file (C:\Windows\System32\drivers\etc), add a new line with 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.