WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Uploaded images don't show following server move (2 posts)

  1. dgilmour
    Member
    Posted 1 year ago #

    I have spent a couple of days trying to find out why uploaded image files are not displaying on the subdirectory site http://edubuzz.org, and would appreciate some pointers to next steps.

    There are two main symptoms:

    1. Uploaded images are not displayed on the site via the URL used by WP. Example is http://edubuzz.org/files/2010/09/edubuzz-whats-on-button.jpg (in the right sidebar of http://edubuzz.org)

    2. Although the (subdirectory) site home pages are accessible, only the first post's title is displayed. Example: http://edubuzz.org/northberwickhigh/ Attempts to access any subpages, e.g. http://edubuzz.org/northberwickhigh/departmental-information/careers/, generate a file not found error. Resetting permalinks does not fix this.

    Additional information:
    I have been through a number of posts about this, and have learned that:

    1. Files are accessible to web server. Uploaded images can be displayed by URLs of this form: http://edubuzz.org/wp-content/blogs.dir/1/files/2010/09/edubuzz-whats-on-button.jpg

    2. Hosting company has confirmed that the rules here for "Apache Virtual Hosts and Mod Rewrite" are in place: http://codex.wordpress.org/Multisite_Network_Administration

    3. The .htaccess rules are the same as before the site move. The .htaccess file is owned by the correct account, and protection is correctly set (644). The rewrite rule for uploaded images is:

    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

    4. I have used the .htaccess tester at http://htaccess.madewithlove.be/ with my rewrite rules to establish that the following virtual URL:
    http://edubuzz.org/files/2010/09/edubuzz-whats-on-button.jpg
    should be rewritten to
    http://edubuzz.org/wp-includes/ms-files.php?file=2010/09/edubuzz-whats-on-button.jpg - and have established that pasting this rewritten rule into the browser does not display the image.

    5. The site has been running successfully for many years on a dedicated server, and has recently had to be moved and rebuilt. It's now on a new dedicated server, running a newer server OS, with completely fresh WordPress, theme and plugin code. AS part of that, it has gone from 3.4.1 to 3.4.2.

    6. Another difference is that the new server uses a different directory structure above the site home directory. It is now /var/www/vhosts/edubuzz.org/httpdocs and previously was /home/e/d/edubuzzadmin/web/public_html.

  2. dgilmour
    Member
    Posted 1 year ago #

    Solved; wp-config.php had acquired a rogue new line after the final ?>.

    Thanks to kingkong954: http://wordpress.org/support/topic/ms-filesphp-not-actually-serving-images?replies=8#post-1801522

Topic Closed

This topic has been closed to new replies.

About this Topic