To move your store to another directory on the same server, complete the steps below:
Open the Administration panel of your store.
Under Administration β Stores, choose a store, and replace the Storefront URL value with the new one.
Note
Skip step 2 if you use Multi-Vendor.
Move all the files of your store to the new directory on the server.
In this directory, open the config.local.php file.
Find the following part of the code:
// Host and directory where the store is installed on no-secure server
$config['http_host'] = 'www.your_domain.com';
$config['http_path'] = '/your_store_directory';
// Host and directory where the store is installed on secure server
$config['https_host'] = 'www.your_domain.com';
$config['https_path'] = '/your_store_directory';
Replace your_store_directory with the name of the directory where you moved the files of your store.
Save the file.
If the SEO add-on is enabled, open the .htaccess file located in the root directory of your store.
Find the following line of code there:
# RewriteBase /subdirectory
Replace the line with the following one:
RewriteBase /subdirectory
Important
Remember to replace /subdirectory with the directory path to which you have moved the files of your store. For example, if your store URL was http://www.your_domain.com/store, and you changed it to http://www.your_domain.com/new_collection/shop, the path will be /new_collection/shop.
If you move your store to the web root directory, the line of code above should look like this:
RewriteBase /
Save the file.
Clear the cache before starting to work with your store.
Hint
To clear the cache via the Administration panel, go to Administration β Storage β Clear cache. If you can’t access the Administration panel, clear the cache manually by deleting the var/cache directory of your store.
Questions & Feedback
Have any questions that weren't answered here? Need help with solving a problem in your online store? Want to report a bug in our software? Find out how to contact us.