Support » Fixing WordPress » Setup WordPress in a subdirectory within root. Images not uploading correctly.

  • simon every

    (@simon-every)


    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.

    Right.

    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:

    require(‘./wp-blog-header.php’);

    to:

    require(‘./site/wp-blog-header.php’);

    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:

    http://wordpress.org/support/topic/images-not-appearing-after-moving-to-subdirectory?replies=2

    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 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • esmi

    (@esmi)

    Forum Moderator

    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?

    simon every

    (@simon-every)

    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.

    simon every

    (@simon-every)

    Resetting permalinks didn’t work.

    Anyone any other ideas?

    simon every

    (@simon-every)

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

    http://www.boutell.com/gd/

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

    Thanks

    esmi

    (@esmi)

    Forum Moderator

    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.

    simon every

    (@simon-every)

    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…

    simon every

    (@simon-every)

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Setup WordPress in a subdirectory within root. Images not uploading correctly.’ is closed to new replies.