0

After a moving a existing WordPress multi site installation to a new VPS the images stopped working for subsites.

enter image description here

The domain is mapped to the new IP address, so if you try out the url in the image you will be hitting thte old/current web server. The new server is hosted on IP address 217.70.34.131.

Before the move images worked on the old webserver with the same settings.

Images exist in the folder on disk, so it has to do with something other, maybe permissions that are configured wrong.

I think it has something to with the permissions and/or rewrite rule that we have in place. I have tried several different approaches but I'm totally stuck at the moment.

.htaccess

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]

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

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
halfer
  • 19,824
  • 17
  • 99
  • 186
Webking
  • 1,822
  • 2
  • 20
  • 28
  • Problem solved, it had to do with permission in the /wp-include where restricted. Because of the RewriteRule the wp-included needed permissions to execute files within. **RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]** – Webking Apr 02 '18 at 07:53

1 Answers1

2

Check the permission of the file folder Change The mode as the user permission is probhited. The mode you can find in Cpanel->filemanager->website folder->wp-content->files