how-to-clone-magento-post-featured-image-600x450

10 Error Free Steps to Clone Magento Store Into New Folder

Share your love

This post enumerates 10 error free steps to clone Magento store into a new folder in the same hosting server. Cloning your Magento store into a new folder means you either you want to view the clone as a subdomain or as a subfolder:

Main Goal

The main goal of these steps is to let you and your team view an exact live working copy within 1 to 2 hours. Therefore, knowing how to use cPanel and working with installed Magento files is a must.

10 Steps to Successfully Clone Magento Store

  1. First, create the subdomain or add a new folder in the root directory of your site.
  2. Next, using cPanel’s Code editor, open your existing Magento store’s /app/etc/local.xml file. Take note of the database name and database user.
  3. Open phpMyAdmin and duplicate the database.
  4. How to duplicate the database via phpMyAdmin

    • Find the database name from the left column of phpMyAdmin then click on it.
    • Click the Operations tab from the top menu.
    • Type a name for the clone database.
    • Make sure you select the same three highlighted options as shown in my screenshot below.
    • Click the Go button.
    clone magento store post screenshot
    How to duplicate a database via phpMyAdmin
  5. Now, open MySql databases and add the same database user with the clone database.
  6. Open File Manager.
  7. Then, go inside the original Magento site’s directory and copy all its files to the new location’s folder that you’ve created in Step 1.
  8. After cPanel has finished copying, open the clone’s /app/etc/local.xml file with cPanel’s Code editor tool and replace the database name with the clone database name.
  9. Go back to phpMyAdmin and select the core_config_data table of the clone database. Replace the unsecure base URL and secure base URL with the subdomain or the subdirectory URL.
  10. Delete all cache files inside the new location’s /var/cache/ directory.
  11. Finally, visit the subdomain or subfolder URL on your favorite browser to view your Magento store copy. Also, try logging in to the backend using the same user name and password as the original site.

By carefully following all the above 10 steps, your clone Magento site will be the exact working copy of your existing Magento website.

The fastest way to make it right, if you see an error when visiting the clone Magento site, is to start from Step 1 again. Then, just cleanup later by removing the other folders and databases not in use to free up server disk space.

Share your love

Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124