Jump to content

Shop URL has /presta/


Maggie Admin

Recommended Posts

Hi gurus,

 

How do I remove this subdomain from the my site URL?

 

Current it is www.xyz.com/presta/

 

I think it is because of the presta installed in the server as a separate folder.

 

Do I need to move the files to the main domain to remove this /presta/? Would it disrupt the database?

 

Please advise the best way to achieve this.

 

Many thanks

Link to comment
Share on other sites

If you don't want to have the sop in a sub-folder like /pressta/ than you should make the following.

 

On back-office change the URL to / on tab: preferences -> SEO & URL's -> base Uri : / (instead of /presta/). Logo-out from back-office, clear your browser cache and than move on FTP all folders and files from folder /presta/ to the root, so one instance before.

 

Before you do this, make a back-up of database and also of your FTP (ask your provider, if you don't know how).

Link to comment
Share on other sites

This simple advice may be judged as enough, but it is only the first step. :)

In fact furthermore you have to change the url in several parts of the database to make this work. Which means every field where the physical uri is stored, e.g. ps_shop_url, ps_configuration, ps_connection_source etc. This can be done manually or with a global sql statement. To find the old physical uri search for /presta/ in your database using Phpmyadmin and replace every finding with just a slash.

 

And after all this is done you need to regenerate your .htaccess!

 

Otherwise the above advice will cause a desaster.

Link to comment
Share on other sites

If you don't want to have the sop in a sub-folder like /pressta/ than you should make the following.

 

On back-office change the URL to / on tab: preferences -> SEO & URL's -> base Uri : / (instead of /presta/). Logo-out from back-office, clear your browser cache and than move on FTP all folders and files from folder /presta/ to the root, so one instance before.

 

Before you do this, make a back-up of database and also of your FTP (ask your provider, if you don't know how).

 

This simple advice may be judged as enough, but it is only the first step. :)

In fact furthermore you have to change the url in several parts of the database to make this work. Which means every field where the physical uri is stored, e.g. ps_shop_url, ps_configuration, ps_connection_source etc. This can be done manually or with a global sql statement. To find the old physical uri search for /presta/ in your database using Phpmyadmin and replace every finding with just a slash.

 

And after all this is done you need to regenerate your .htaccess!

 

Otherwise the above advice will cause a desaster.

 

Thank you both for the advise. Sounds like its very complex I guess, I have to back it up first.

 

Do you know if there any doc guide for this activity?

Link to comment
Share on other sites

No, it's not very complicated. :)

 

For the first step described by selectshop.at you may use the following tutorial: http://www.templatemonster.com/help/prestashop-1-6-x-how-to-move-website-from-sub-directory-to-the-root-folder.html#gref

But after the first step described here scroll down to save button of section url scheme and click save to regenerate the .htaccess.

 

For the 'fine tuning'

  • open PhpMyAdmin
  • click Tab Search
  • enter /presta/ - click All tables, and afterwards button Go bottom right
  • scroll finding to first blue link
  • click link and scroll down, where you find the entry to change
  • Change value /presta/ to simple slash and save
  • Scroll up again to next blue link and repeat for every finding

Done!

Link to comment
Share on other sites

BTW, I never had to touch or change the URL into database directly. If you first make the changes on BO, instead of to move FTP before, you don't really need to touch the database. Several customer shops, also with SSL moved by this way, without need to make changes on database. Perhaps if you make it as opposite, first move FTP than BO it will not work. Never tried, so I don't can say.

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...