Setup WordPress in a subdirectory within root. Images not uploading correctly. (8 posts)

  1. simon every
    Posted 3 years ago #

    Hi there peeps,

    I've seen this type of issue here and there on the forums but none seem to have quite nailed the solution for me. I've had a play around trying to fix it but I think it'd be more constructive getting down to specifics on here and posting up a detailed solution.


    I installed WordPress in to a subdirectory (/site) on the server root (public_html). Here I developed and got the site running nice and smoothly before following the instructions here: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    So changed the settings:

    WordPress Address (URL): http://mysite.com/site
    Site Address (URL): http://mysite.com

    Copied the index.php and .htaccess from /site over to the root, opened index.php (in root) and changed the line:




    Everything seems to be working fine except when I attempt to upload images WordPress fails to generate the file sizes. If I look in the uploads folder the image is nowhere to be seen. I've checked that the uploads folder has recursive permissions set to 777.

    It seems as though others have had this problem:


    This answer is correct - all of my images etc. are referencing http://mysite.com/site. However there doesn't seem to be a solution?

    Any help would be massively appreciated. I'm a bit of a newb so I'll try to answer an queries as best I can.

    Thanks in advance :)

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    I'm currently running multiple sites in sub-dirs and none have this problem - so it's something specific to your site or server.

    WordPress fails to generate the file sizes

    Are you running any other WordPress sites on the same server?

  3. simon every
    Posted 3 years ago #

    Hey - thanks for the reply!

    Nope - just the one.

    I'll try removing the .htaccess, resetting the permalink stucure and recopying the .htaccess to the root.

    See if that works.

  4. simon every
    Posted 3 years ago #

    Resetting permalinks didn't work.

    Anyone any other ideas?

  5. simon every
    Posted 3 years ago #

    I've read that this might have something to do with having support for the GD Library on my server...


    I'm pretty sure this would be supported. Does anyone have any experience with this being an issue?


  6. esmi
    Forum Moderator
    Posted 3 years ago #

    That's the next question I was about to ask. :-) You'd need to check with your hosts that the server is running the latest version of GD Library.

  7. simon every
    Posted 3 years ago #

    Having read other people's post on getting WordPress installed in a subdirectory I don't think it's an issue that images etc reference the subdirectory in the URL.

    This is normal unless you prefer to have some .htaccess wizardry rto rewrite it.

    So this doesn't seem to be part of the issue...

  8. simon every
    Posted 3 years ago #

    Ok, so I checked with my hosting provider and the GD Library is supported so this isn't the issue.

Topic Closed

This topic has been closed to new replies.

About this Topic