开发者

Open cart site transferred to another host with images broken

I have transferred the Open Cart site over to another domain but all the images are broken adn I cannot get into admin. Is there a reason why?

I have ch开发者_如何学Pythonanged the config database credentials.


In addition to changing the database credentials, you have to change the directory paths in both config.php and admin/config.php.

Old server

define('DIR_APPLICATION', '/home/oldhost/sites/example.com/html/catalog/');

New server

define('DIR_APPLICATION', '/home/newhost/sites/example.com/public_html/catalog/');


I know it is old but there may be some other guys out there who run into this same problem nowadays too and are stuck with it or can't figure out what the problem is. After migrating your shop, you will receive broken image errors and/or not displaying images (even after you have set everything correctly in the config files and changed the file/folder permissions) because the paths in the database are probably incorrect. You need to update the links in your database based on your new FTP file structure. 'product_images' table for the images and 'product' table for miniatures. You can do it manually from the admin panel by actually opening all products and adding the photos again (This is rather ridiculous) or they may have a module to do the job. I honestly did not find anything - not even a proper answer on the official forum of the provider in question to what the problem was so I created a simple JAVA application that updates the image paths (leaving the file names "untouched") in the database based on the FTP file structure. You can download it by clicking the following MEGA link. Before doing anything, please make sure you have a back-up of everything (database and files). Link: https://mega.nz/#!8cF1DawQ!C_pzuJJvxOBkPa8Koss_yfMxlF59l_8c0OewghoAzuA

Hope it is helpful! Regards

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜