Jump to content

Moving PrestaShop from shared host to VPS server PROBLEM


TomasK1712

Recommended Posts

Hello, 

anyone can help?

My site is not displaying correctly after moving from shared host to VPS.

I followed all know tutorials... export/import database via PhpmyAdmin / set PhP to the same as was on shared host / deleting cache

after directing the domain to new IP (VPS server) the site is not displaying correctly. 

Actually I redirected the domain back to the shared host (so now it is working fine on www.vecinakolo.cz) But here are printscreens...

I really need to solve this...I spent two days finding solution..so I really appreciate some advice or help

Thanks

Tomas

 

109779293_Snimekobrazovky2021-02-11v11_10_15.thumb.png.146d34e108633e291ad3db8f676a9e76.png

Snímek obrazovky 2021-02-11 v 11.09.22.png

Link to comment
Share on other sites

Check the following:

1. Do you have the correct domain in the .htaccess (alternatively you can rename the .htaccess and let PS regenerate another)?

  Note: #Domain set to your domain name and Rewritebase to / if PS in webserver's root.

2. Do you have the correct domain name in the DB tables ps_configuration and ps_shop_url? 

   Note that physical_url in ps_shop_url must point to / if the files are in the webserver's root.

3. Did you clear the cache (alternatively completely remove var/cache directory from within the Prestashop)?

Link to comment
Share on other sites

Before migrating from shared to VPS, just create a clone of your website. Then you can change your DNS once you are satisfied.

VPS/php/nginx/apache has logs. You should go through and correct all the errors. Migrating the files might not just be enough. You need to verify that the server infrastructure matches between them.

This is why people use Docker container to avoid the mess.

Link to comment
Share on other sites

Thank you guys for your tips!

It seems like some CSS error. I redirected the domain back to the shared host. Today I tried to customize the theme.css file in themes/classic/assets/css  and front end shop give me that same CSS error like the migrated version of site. I restored the original theme.css file...but error is still ocurring:-(

Any ideas how to correct it?

Thanks a lot

 

Snímek obrazovky 2021-02-15 v 12.30.14.png

Link to comment
Share on other sites

Clearly your Css is not loading.

   Step 1  confirm that your Css is not loading by giving us the errors in your browser (you should see an error appearing in your page source).

   Step 2 Goto Adminpanel->Advance perimeters->Performance check the smarty cache memory enable and clear the cache. 

   Step 3 is to verify that you disabled all caches for now. Clear your browsers/server cache too when testing. see if this works

  Step 4 Check your server permissions.  

  Step 5 If this doesn't work give us the messages in your log files (are you using apache or Nginx?). 

Let's Start by this.

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

Thanks Henrik41,

( I am using Apache)

Today I have some progress, I migrated whole site once again to make sure there was no file transfer error..

Now it seems like all CSS works OK, front shop and also back office works!

But console show me 12 errors on frontend and 16 errors on backend (javascript??) - attached

How can I fix this?

Shop is now online and I disabled the maintenance mode so you can check it also... www.vecinakolo.cz

Thanks!

Snímek obrazovky 2021-02-16 v 21.13.58.png

Snímek obrazovky 2021-02-16 v 21.14.45.png

Link to comment
Share on other sites

8 hours ago, Henrik41 said:

You have a problem with Jquery not loading first. Also your server should be able to process Javascript.

You need to make sure Jquery is loaded on top or else you will get tons of errors.

Which prestashop version are you using?

Prestashop 1.7.7.1

Link to comment
Share on other sites

Upon reviewing your site:

    1. You have a problem with your jquery not loading first. Actually it is not loaded at all. You have core.js and theme.js loading before jquery-ui-min.js which i do not suggest. This is likely a problem with your template and not prestashop or your server. Check your template files. and add Jquery in the <head> with the correct folder/subfolder.

    2. While you are at it update your Jquery- UI 1.10.3 has a XSS vulnerability. change it if you do not want to be hacked.
 

Hope this helps.

Link to comment
Share on other sites

2 hours ago, Henrik41 said:

1. You have a problem with your jquery not loading first. Actually it is not loaded at all. You have core.js and theme.js loading before jquery-ui-min.js which i do not suggest. This is likely a problem with your template and not prestashop or your server. Check your template files. and add Jquery in the <head> with the correct folder/subfolder.

I am a bit puzzled about these messages. Normally with such errors nothing works. But on this site everything seems to work. Could it have something to do with JQMigrate?

Link to comment
Share on other sites

But the printscreens I sent yesterday was from the migrated site with errors..

Today I have to switch the DNS back to the old host where everything works fine.. so you actually see the live site on shared host (no errors)

Thanks for reply guys...  

But I still haven't solved the migration problem to the VPS ...on 1st attempt there were CSS errors ..on 2nd attempt (yesterday) there were Javascript errors..so I decided to give it up for now.. I need to get the site live for now

I will set up some test domain for the cloned site with errors and send you a link

Edited by TomasK1712 (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...