If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)

captcha

OpenCart 2.x. How to move the website from sub-folder to the root

This tutorial shows you how to move OpenCart 2.x. installation from the sub-directory to the root.

OpenCart 2.x. How to move the website from sub-folder to the root

The following steps should be performed in order to trasnfer 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 reuqired.

  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:

    OpenCart_2_Moving_from_subfolder_to_root_1

  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.

    OpenCart_2_Moving_from_subfolder_to_root_2

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

Note: only sever files are to be used, the Database should not be modified.

Feel free to check the detailed video tutorial below:

OpenCart 2.x. How to move the website from sub-folder to the root