The setup:
I have two WordPress installations. One in the root of the Server and one in a subdirectory, every installation has it’s own database. The subdirectory installation is connected with a subdomain.
The problem:
In the subdirectory installation, no images show up – even in the admin menu. I checked the paths and they were correct. I also checked for writing permissions, everything is fine. So the images are all in place, the upload also works but when trying to access the images, I get the 404 page of the subdirectory install (/blog is the folder name).
What I think:
My guess is that the .htdocs file in the root actually blocks access to the /blogs subdirectory or something like that.
Of course I already did a Google search, but that didn’t help much. The Codex article Giving WordPress Its Own Directory actually seems helpfull, but I can’t move the subdirectory’s index.php into the root as this would clash with the WordPress installation there.
How to fix my problem?
Edit
At the moment I am not so sure about the .htaccess anymore. When I try to access blog.mydomain.com/wp-content/uploads/2013/06/logo.jpg (blog.mydomain.com is the subdomain) I get a 404. But accessing mydomain.com/blog/wp-content/uploads/2013/06/logo.jpg everything is fine. So maybe I just have to set WordPress to a different path somehow?
Re Install the WordPress core files (minus the wp-config.php and the wp-content directory) then run from the parent directory:
sudo chmod -R g+rw blog/
My money is on an htaccess issue in the parent directory. In my experience it’s challenging to get other web apps that utilize mod_rewrite to play nice when WordPress is in the parent.
First things first, view the page source on a page with missing images. Look for any image that isn’t showing up and note its path. Does it look out of order? If so, back up then delete your .htaccess in the parent directory. Do the images appear now on the /blog install? If they do you’re having a ‘htaccess collision’. I’m not sure how to fix other than disabling ‘pretty’ permalinks on the parent blog.
Secondly is there a specific reason you’re running two installs? You can make a domain.com/blog on the parent WP install by using categories and subcategories along with %category% as part of your permalink structure. One install will make things easier now and down the line.