OpenCart – one of the commonly used open source PHP shopping cart software. This can be easily installed on your domain from your cPanel using Softaculous script installer. Today I am going to give you one by one easy steps to move your OpenCart Store installed on one directory to another directory on your domain. For eg:- www.yourdomain.com/ocart to www.yourdomain.com.
This can be easily done from your cPanel File Manager without messing up with your MySQL database.
Step 1. Login to your cPanel
Step 2. Go to your File Manager, and got to the Document root of the domain.
Step 3. If your OpenCart is installed on the folder “ocart” (‘ocart’ is the example here, this may be different for your installation folder), open the folder and select all the files in that folder and move it to your destination folder using cPanel “Move File” option. (Here I am moving www.yourdomain.com/ocart to www.yourdomain.com)
Step 4. Once you have moved all the files, you need to return to the destination folder where you moved the files. Here we need to manually edit a few lines in two configuration files. They are;
- admin/config.php (This config file can be found inside the “admin” folder)
Now edit the first config.php file using your cPanel edit file option. Since I want to move the files from www.yourdomain.com/ocart to www.yourdomain.com I am removing the “/ocart” from the file and save the file.
Now edit the config.php file inside the “admin” folder, be careful when editing this file. Remove all the “/ocart” from this file and save it. Please note that you need to replace your corresponding URL and your folder name.
Here we go! You are done with moving your OpenCart to a new folder. Test it by loading www.yourdomain.com onto the browser.