brunomorais Posted July 13, 2017 Share Posted July 13, 2017 Hi, I'm trying to change the domain of a Prestashop V 1.7 directly in the database from mystore.com to mystore.net for instance. I went to database in table ps_configuration fields PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL and change the domain to mystore.net. The problem is when I go to mystore.net I'm always redirected to the old domain mystore.com . I'm missing something here. Anyone can help? Thanks. regards, Bruno Morasi 1 Link to comment Share on other sites More sharing options...
bellini13 Posted July 14, 2017 Share Posted July 14, 2017 I believe those fields in the ps_configuration table are the older ways of doing it. Once multi-store feature was created, the domain information is now stored in the ps_shop_url table. Once changed, you also need to ensure the .htaccess or nginx rules are updated to reflect the new domain. An easier approach is to just log into the back office and change the domain name in the SEO & URL page, and let Prestashop take care of the rest. 2 Link to comment Share on other sites More sharing options...
vvucic Posted August 11, 2017 Share Posted August 11, 2017 I changed domain in alll three tables that you mentioned but it still redirects to old domain. please advise. Thanks 2 Link to comment Share on other sites More sharing options...
Scully Posted August 11, 2017 Share Posted August 11, 2017 Rewrite the .htaccess 1 Link to comment Share on other sites More sharing options...
bellini13 Posted August 11, 2017 Share Posted August 11, 2017 I changed domain in alll three tables that you mentioned but it still redirects to old domain. please advise. Thanks Once changed, you also need to ensure the .htaccess or nginx rules are updated to reflect the new domain. 1 Link to comment Share on other sites More sharing options...
vvucic Posted August 12, 2017 Share Posted August 12, 2017 I cleaned cache of server and worked fine. Thanks for support Link to comment Share on other sites More sharing options...
DavidTech Posted August 19, 2017 Share Posted August 19, 2017 (edited) I am facing the same exact problem. But i did not find the ps_shop domain on the prestashop 1.7 database, is that removed? I am using the version 1.7.1.2 Also, what do i need to modify on the .htaccess file in order to prevent the redirection from the remote server to localhost? Thank you for your time. Here is my .htaccess code which is apparently wrong and redirects to localhost, even if the website and database are on remote server. # ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again # .htaccess automaticaly generated by PrestaShop e-commerce open-source solution # http://www.prestashop.com - http://www.prestashop.com/forums <IfModule mod_rewrite.c> <IfModule mod_env.c> SetEnv HTTP_MOD_REWRITE On </IfModule> RewriteEngine on #Domain: localhost RewriteRule . - [E=REWRITEBASE:/prestashop/] RewriteRule ^api$ api/ [L] RewriteRule ^api/(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] # Images RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L] RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L] # AlphaImageLoader for IE and fancybox RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L] # Dispatcher RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L] </IfModule> AddType application/vnd.ms-fontobject .eot AddType font/ttf .ttf AddType font/otf .otf AddType application/font-woff .woff AddType application/font-woff2 .woff2 <IfModule mod_headers.c> <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|svg)$"> Header set Access-Control-Allow-Origin "*" </FilesMatch> </IfModule> #If rewrite mod isn't enabled ErrorDocument 404 /prestashop/index.php?controller=404 # ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again Edited August 19, 2017 by DavidTech (see edit history) 1 Link to comment Share on other sites More sharing options...
Scully Posted August 19, 2017 Share Posted August 19, 2017 DavidTech - where should we now follow your issues? You have it open on two different threads. 1 Link to comment Share on other sites More sharing options...
Harkanwal Posted August 31, 2018 Share Posted August 31, 2018 In Admin page go to CONFIGURE> Shop Parameters> Traffic & SEOSET SHOP URL and you have new URL for your store. 1 Link to comment Share on other sites More sharing options...
Inform-All Posted September 19, 2018 Share Posted September 19, 2018 prestashop also has a table named "xx_shop_url" (where xx is your database pre) in there you should also change the url. 1 1 Link to comment Share on other sites More sharing options...
Hechadi Elhassania Posted October 1, 2018 Share Posted October 1, 2018 On 13/07/2017 at 11:03 PM, brunomorais said: Hi, 1- change table "ps-configuration" -> PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL value 2- Change table "ps-shop-url" 3- Rewrite the .htaccess 1 Link to comment Share on other sites More sharing options...
heyho Posted November 9, 2018 Share Posted November 9, 2018 (edited) I forgot to buy SSL on the new Domain so i had to disable SSL in the Database temporary: UPDATE `ps_configuration` SET `value` = 0 WHERE `name` = 'PS_SSL_ENABLED'; UPDATE `ps_configuration` SET `value` = 0 WHERE `name` = 'PS_SSL_ENABLED_EVERYWHERE'; Edited November 9, 2018 by heyho (see edit history) 1 Link to comment Share on other sites More sharing options...
prestol Posted November 11, 2019 Share Posted November 11, 2019 (edited) hello i did 1.7.6.1 change your prefix "ps_" if you installed with another.. mysql -u prestausr -p; pass-- show databases; use prestashop-name-here; UPDATE `ps_configuration` SET `value` = 'staging.example.com' WHERE `ps_configuration`.`id_configuration` = 229; UPDATE `ps_configuration` SET `value` = 'staging.example.com' WHERE `ps_configuration`.`id_configuration` = 230; UPDATE `kh_shop_url` SET `domain` = 'staging.example.com', `domain_ssl` = 'staging.example.com' WHERE `kh_shop_url`.`id_shop_url` = 1; vi /var/www/html/example.com/.htaccess /var/www/html/example.com/.htaccess change all old domain name to new domain name old.example.com staging.example.com then update apache with correct virtualhost Edited November 11, 2019 by prestol (see edit history) 1 Link to comment Share on other sites More sharing options...
hardstonepaul Posted October 22, 2021 Share Posted October 22, 2021 Hello Prestashopers On the DB in table: `ps_shop_url`, change the 'domain' value for your new URL, also in 'domain_ssl' then, when you can log to your back office go to On 8/31/2018 at 5:43 AM, Harkanwal said: Shop Parameters> Traffic & SEO and save again the same information in the part "Set shop URL" and working 1 Link to comment Share on other sites More sharing options...
adao Posted March 8, 2022 Share Posted March 8, 2022 Hello Prestashopers! Also have the same problem here. I need to change my domain to access my dashboard, just one question: If i change my domain on my DB table will the sales data from the old domain be erased? Or it will just create a new DB without any kind of info? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now