Close this search box.
Close this search box.

How to move your magento site to localhost

Step 1:

Download all files and copy them to your localhost folder. eg. www/my_magento_site

Step 2:

Download the database and insert it to a new database in your localhost phpmyadmin.

Step 3:

Go to app/etc/env.php and change the lines below:

'connection' => [
    'default' => [
        'host' => 'localhost',
        'dbname' => 'magento_local_db',
        'username' => 'root',
        'password' => '',
        'active' => '1'

Step 4:

Open your phpMyAdmin and open core_config_data table and replace your localhost URL to your Domain name in “web/unsecure/base_url” , “web/secure/base_url”.

Step 5:

In your wamp local server, make sure that you have mod_version enabled. If not

  1. Open your httpd.conf file.
  2. Uncomment line LoadModule version_module modules/
  3. Restart your wamp server

Step 6:

Clear your magento cache. Do to so just go to /var/cache and delete all the files and content from there.

Step 7: 

Check that everything works as expected.