0

I was working on a Wordpress website in our development server and everything was showing up correctly. I migrated the site to the live server and now NONE of the images are showing up. I have migrated a lot of Wordpress sites, but this time I can't seem to figure out what is going on.

Inside the posts, I have all the feature images set and they are all where they are supposed to be. When I inspect the code in the browser, I see that the loop is returning all the posts but the src, width, and height are empty for each item. The file that handles this template is the same in both locations so I am guessing it could be a database problem?

Here is the link to the development site: www.modpreview.com/mod And this is the live site m.modworldwide.com

Any idea why this could be happening? Has anyone encountered this problem before? Any help would be appreciated!

sayra90
  • 21
  • 2
  • 6
  • Look in the page's source code and get one of the image URLs that fail. What happens when you try to open them manually in the browser? – Pekka Jan 02 '14 at 17:15
  • Since you went from a subdir (/mod) to the root (/) all your relative paths are probably hosed. – Digital Chris Jan 02 '14 at 17:17
  • The page's source code has the image src as empty, so there is nothing to check. When I go to the media library and copy the image url they are all where they are supposed to be. I did run all the query calls in the database to make sure the domain is the new one. The problem is that during the loop the src is not getting filled in. – sayra90 Jan 02 '14 at 18:19

1 Answers1

0

Without more info, a guess for you:

Maybe check out the .htaccess in the webroot the site is being served from. Perhaps you are missing the line where the logic says "if the file exists, serve it, otherwise redirect to the php front controller"

which looks like this:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . /index.php [L]

This is possible to configure through the wordpress admin if your .htaccess has webserver write permissions, otherwise you need to manually edit it from the CLI or FTP or whatever you are using.

http://codex.wordpress.org/htaccess

codercake
  • 1,017
  • 7
  • 6
  • The .htaccess I have looks like this: RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] – sayra90 Jan 02 '14 at 18:10