Jump to content

[SOLVED] How to move PS installation from a subfolder to the root directory?


Recommended Posts

Basically, you need to copy the files from /public_html/test and paste them directly in the root public_html folder. Then edit the file settings.inc.php (public_html/config/settings.inc.php). Change the line:

 

define('__PS_BASE_URI__', '/test/');

 

into:

 

define('__PS_BASE_URI__', '/');

 

Then log in to the back office using the root URL address, go to the Preferences tab>SEO & URLs sub-tab and change the path to the shop in the field for PS directory; in this case it's the root (e.g. /). You don't have to change any database names or prefixes in the config file since you're not moving to a different server, and I assume you'll be using the same database. You'll also need to regenerate the robots.txt file and the .htaccess file. You can do this from Tools tab>Generators sub-tab.

 

To remove the old shop just delete the contents of /public_html/test. Before you start the transfer you may consider disabling the shop (if it's in production mode at all), although this whole thing shouldn't take more than a few minutes.

 

Hope this helps.

  • Like 1
Link to comment
Share on other sites

  • 6 months later...
×
×
  • Create New...