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?

  • What is in your root .htaccess? You mention "write" permissions. What about "read" permissions? – s_ha_dum Jun 1 '13 at 19:12
  • @s_ha_dum Ok I think the problem is a different one, please see my edit. – Sven Jun 2 '13 at 16:30
  • Now it sounds like a subdomain configuration issue. That is server level. How did you set that up? – s_ha_dum Jun 2 '13 at 16:41
  • @s_ha_dum Well in the root of my server I have an installation. Also in the root is a folder "blog" with another installation. Both installations use different databases. In the control panel of my host I just routed the subdomain "blog.mydomain.com" to the folder "blog". – Sven Jun 2 '13 at 16:45
  • But the working URL indicates that the subfolder is blogm not blog. It would help if you'd provide real URLs and not domain.com fake ones (if possible). – s_ha_dum Jun 2 '13 at 16:50

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/

| improve this answer | |
  • Hey, I made an edit to my post, maybe you can take a look at it? I don't think it has anything to do with permissions anymore. – Sven Jun 2 '13 at 16:33

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.

| improve this answer | |
  • My apologies I didn't realize how old this post was before posting and am not sure how to delete from the iOS app. – DanTheManDRH Dec 17 '16 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.