Jump to content

What is proper way to migrate subdomain to main domain 1.7


hank22

Recommended Posts

Hello,

I created a new PS 1.7.7.2 store in a subdomain. Now I would like to move the subdomain to main domain. What are the proper steps for this to work? The old site is on a different server. The subdomain is on the new server. 

In the subdomain PS back office I changed the SEO & URL to the main domain. But now I can't access the new 1.7.7.2 shop. 

Any help is appreciated. 

Thank You

 

 

Link to comment
Share on other sites

On 3/18/2021 at 11:38 PM, hank22 said:

Hello,

I created a new PS 1.7.7.2 store in a subdomain. Now I would like to move the subdomain to main domain. What are the proper steps for this to work? The old site is on a different server. The subdomain is on the new server. 

In the subdomain PS back office I changed the SEO & URL to the main domain. But now I can't access the new 1.7.7.2 shop. 

Any help is appreciated. 

Thank You

 

 

Move the files to the root. Change the SEO&URL (ps_shop_url) settings. Clean the cache. 

And as you are on a different server: change the DNS settings.

That is all.

Link to comment
Share on other sites

Hello,

That case worked in previous versions of Presta Shop, but now in 1.7.7.2 that is not working . 

In my case the domain is on domain.com and I copy it to dev.domain.com.

After the copy I've :

1. Reconfigured databace configuration to the new database for that domain;

2. changed the PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL in ps_configuration table in the database with the new domain;

3. Edited the domain in the .htaccess file;

4. Removed the cache.

 

But at this point there are some problems : 

1. The frontend is printing "ERR_INVALID_REDIRECT";

2. The backend is not loading correct;

3. With a lot of custom changes I get in SEO&URL page where the site and SSL addresses are missing (see the picture).

 

There are no errors in log... 

I've moved a lot of PrestaShops before, but now I stuck

ps_seo.png

Link to comment
Share on other sites

1 hour ago, Iliya Hristov said:

Hello,

That case worked in previous versions of Presta Shop, but now in 1.7.7.2 that is not working . 

In my case the domain is on domain.com and I copy it to dev.domain.com.

After the copy I've :

1. Reconfigured databace configuration to the new database for that domain;

2. changed the PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL in ps_configuration table in the database with the new domain;

3. Edited the domain in the .htaccess file;

4. Removed the cache.

 

But at this point there are some problems : 

1. The frontend is printing "ERR_INVALID_REDIRECT";

2. The backend is not loading correct;

3. With a lot of custom changes I get in SEO&URL page where the site and SSL addresses are missing (see the picture).

 

There are no errors in log... 

I've moved a lot of PrestaShops before, but now I stuck

ps_seo.png

And I found the solution : 

Some how the record in table ps_shop_url in database has been removed . 

I have added it with the new domain "dev.domain.com" and the store started working as expected ;) 

Regards 

  • Like 1
Link to comment
Share on other sites

57 minutes ago, Iliya Hristov said:

Hello,

That case worked in previous versions of Presta Shop, but now in 1.7.7.2 that is not working . 

In my case the domain is on domain.com and I copy it to dev.domain.com.

After the copy I've :

1. Reconfigured databace configuration to the new database for that domain;

2. changed the PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL in ps_configuration table in the database with the new domain;

3. Edited the domain in the .htaccess file;

4. Removed the cache.

 

But at this point there are some problems : 

1. The frontend is printing "ERR_INVALID_REDIRECT";

2. The backend is not loading correct;

3. With a lot of custom changes I get in SEO&URL page where the site and SSL addresses are missing (see the picture).

 

There are no errors in log... 

I've moved a lot of PrestaShops before, but now I stuck

 

It is always best to get things working first without SSL. SSL brings its own boatload of troublepoints. That works only confusing when the basics aren't working.

Start with the backend: that should work without any changes. Only the cache might give trouble so it should be cleansed.

You write:

changed the PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL in ps_configuration table in the database with the new domain

Wrong! That was how it was done in Prestashop 1.4. In all later versions you should change the ps_shop_url table.

Link to comment
Share on other sites

When I go ahead with the mentioned actions above I get the following error when access backend admin:

"Oops... looks like an unexpected error occurred.

Unable to write into "en-US"" (data layer : "PrestaShop\PrestaShop\Core\Localization\CLDR\DataLayer\LocaleCache")

[PrestaShop\PrestaShop\Core\Data\Layer\DataLayerException 0]"

 

Would you know how to fix this error?

Thanks so much. 

Link to comment
Share on other sites

9 hours ago, hank22 said:

When I go ahead with the mentioned actions above I get the following error when access backend admin:

"Oops... looks like an unexpected error occurred.

Unable to write into "en-US"" (data layer : "PrestaShop\PrestaShop\Core\Localization\CLDR\DataLayer\LocaleCache")

[PrestaShop\PrestaShop\Core\Data\Layer\DataLayerException 0]"

 

Would you know how to fix this error?

Thanks so much. 

Please provide all information - preferable with a screendump. Now a filename is missing and I can only guess that this is about currency.

Link to comment
Share on other sites

@musicmaster Ok, here are the steps I'm taking. 

I'm working with a test store. (test.mysite.com)

1. Log into PS 1.7.7.2>Shop Parameters>Traffic & SEO>change shop domain from test.mysite.com to mysite.com>change SSL domain from test.mysite.com to mysite.com. Base URI> /

2. Log in to Plesk>Subscription>testmysite.com>Hosting & DNS>Hosting Settings>Domain name changed from test.mysite.com to mysite.com.  Security>SSL/TLS support box checked. 

3. Edited DNS record to new server that is hosting test.mysite.com

Front page of website looks ok, no errors. Try to login to admin and get the error attached. 

Oops... looks like an unexpected error occurred_.pdf

Link to comment
Share on other sites

I turned on debug mode and everything worked. No more errors. 

Now I just turned debug mode off and the error comes up again on backend login:

An exception has been thrown during the rendering of a template ("Unable to write into "en-US"" (data layer : "PrestaShop\PrestaShop\Core\Localization\CLDR\DataLayer\LocaleCache")").

[Twig\Error\RuntimeError 0]

Thank You

Link to comment
Share on other sites

  • 9 months later...
  • 2 weeks later...
On 1/9/2022 at 9:34 PM, Rizzzle said:

FIX in this post. No thanks to you ignorant ducks.

For people that are having this issue:


DELETE the /var folder using your FTP client.

Thank Rizzzle your response saved me.

  • Like 1
Link to comment
Share on other sites

  • 8 months later...

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