How to move an OpenCart website from sub-folder to the root

How to move an OpenCart website from sub-folder to the root

The following steps should be performed in order to transfer the site to the root directory:

  1. First, open server files and locate the subfolder with the current installation. That is ‘test’ in our case.
  2. Back up the files. Keep the .zip file somewhere in your computer, it can be used to restore the original website in case it is required.
  3. Transfer the content of the subfolder to the root directory. Use drag-and-drop tool in your FTP client for this. Once the transfer is completed you can delete the subfolder as it is not going to be used further.
  4. Next, edit config.php file from the root of installation. Use any available HTML editor for that. Remove all the references of the subfolder from the site link – test. Make sure that lines are ended up with ‘ / ‘ symbol.

     

  5. Then open ‘admin’ folder in the new installation root and edit config.php file from there. Use the same HTML editor for that. Remove all the references to the subfolder from the site link – test within entire file. Make sure that lines are ended up with / symbol.

     

  6. Save changes once done editing. Now check the new site’s URL. The website will appear under the root direction properly.

Was this article helpful?

Related Articles

Leave A Comment?