Jump to content

Move prestashop from root to subfolder


Recommended Posts

 

Hello

Im new to PS and am working on my first installation. I installed PS in a root folder (www.demo.com)but now I want to move it to the subfolder folder so it will be www.demo.com/shop

How do I do this?

Link to comment
Share on other sites

literally move all of the folders and sub folders to shop

Then open the database using phpmyadmin, locate the table named ps_shop_url and add /shop/ to the base uri column

Then access the back office, visit the SEO & URL page and save it, which should cause the .htaccess file with apache rewrites to fix itself

  • Thanks 1
Link to comment
Share on other sites

  • 10 months later...

Hi Bellini

I ran into a problem while moving over to my sub folder and got the Error 404 (maybe 401).  Here are my steps, could you let me know what you see.

my old site sits on www.mysite.com and new site sits on www.mysite.com/new_subfolder

1) Told my host to point domain from public_html to new_subfolder

2) Changed in new site, backoffice under SEO and URLs the base url  from /new_subfolder/ to / and saved

3) Page refreshes and i cant see anything, when i load the new admin page www.mysite.com/adminpage i get an error

Even tried the other way

1) Changed in backoffice base url from /new_subfolder/ to /

2) Told host to point domain to new_subfolder

Same result with Error message.

 

Edited by phantomeye
saved to early (see edit history)
Link to comment
Share on other sites

Okay, figured it out.

So the problem was the php-fpm service was causing the site to not load after the change. To fix this:

1) we first stopped the php-fpm service
2) the site loaded properly
3) relaunched the php-fpm service 
4) regenerated the .htaccess and robots.txt file.

Also, after the relaunch, i lost all my product images. Tried regenerating the .htacces file in SEO  URL, however it did not work.
To fix this, i had to rename the existing .htaccess file and then regenerate a new one from SEO URL.

Good to go.

ps: the prestashop version is 1.7.5

Edited by phantomeye (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...