Product images that do not appear after migrating the magento website

I recently migrated my magento website to another server, and this process I used:

  • made a database dump.
  • copied all system files from FTP to my hard drive.
  • freed the VAR folder
  • folders with media cache are omitted
  • replaced strings in SQL dump from http://www.oldsite.com to http://www.newsite.com
  • restored the database on the new server
  • changed the local.xml file in accordance with the new database host, username and password.
  • uploaded system files to the new server

Everything seems to be working fine, except for the fact that product images are not displayed on the interface for any reason.

For example, here is the path from the image that should have been displayed, which I received through firebug:

http://www.newsite.com/media/catalog/product/cache/1/small_image/113x113/9df78eab33525d08d6e5fb8d27136e95/1/_/1_9.jpg

When I look for the path to the image that the site should display on FTP, the file is actually there. I can download it and display it on my computer. I do not know why this is happening. It makes no sense to me.

This /media/catalog/product/cache/ was generated by the system because I deleted it myself before loading the site, so I think this is not a cache problem.

Ok, I described the problem as best as possible. I hope you can help me.

EDIT:
Hmm, it turns out that the problem was in the .htaccess file inside the media folder! File deleted → Problem solved!

+7
image migration magento
source share
5 answers

Just in case someone else has the same problem, deleting htaccess in the media folder did the trick. I do not know if this is the best solution possible! Thanks!

+3
source share

Change Options All -Indexes to Options -Indexes in the above .htaccess file.

+4
source share
  1. copied all system files from FTP to my hard drive.

It makes me a little suspicious. Magento has case sensitive folders in the media folder. There will be, for example, folder "a" and folder "A" in the same place.

If you downloaded files without files (via file) via FTP to a Windows computer, this will lead to a conflict and reduce to half your images.

+3
source share

Ok, since everything is verified with the base URL, my next suggestion is a migration path option if you have cPanel on the old server, and since most of them should help:

  • Create a full backup of your account using cPanel. This will create tar.gz of the entire account.
  • Download tarred backup to your computer and unzip it.
  • Finding home_dir.tar is what your root HTML data contains. You can download it directly to the server and unlock it using SSH, or do it on your local computer and download it.
  • Locate the SQL folder in the backup. There should be a dump of your database. Use the source to put this information in a new database.
  • On the server, delete use_cache.ser and change the configuration information for the new database.
  • Your .htaccess should appear in home_dir.tar, but make sure it is fixed on our other question.

After that, you should be fully operational, unless you need to make changes to the base_url database for the new server.

+2
source share

Images that are not displayed in Magento version 1.7 - 1.9:

My solution :

in / media / .htaccess

Fixed options syntax:

 # Options ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch -Indexes Options +ExecCGI +Includes +IncludesNOEXEC +SymLinksIfOwnerMatch -Indexes 

deleted them. Maybe there is a conflict with .htaccess in the root directory of the site?

 # For security reasons, Option followsymlinks cannot be overridden. # Options +FollowSymLinks # Options +SymLinksIfOwnerMatch # RewriteEngie on 

also changed ownership of .htaccess on apache

 chown apache:apache /var/www/mystore/media/.htaccess 

I would like to express an opinion on why this may cause 500 errors.

+1
source share

All Articles