I have moved the wp-content/uploads
folder to the same folder as the wp-content
folder and then added define( 'UPLOADS', 'uploads' );
constant in the wp-config.php
file.
Now the images are not displaying while I browse the website.
Fyi, My website is a folder-based multisite. For example:
I have moved the wp-content/uploads
folder to the same folder as the wp-content
folder and then added define( 'UPLOADS', 'uploads' );
constant in the wp-config.php
file.
Now the images are not displaying while I browse the website.
Fyi, My website is a folder-based multisite. For example:
I think that you're saying that you have moved your "uploads" directory up a level such that it now exists within your installation root, alongside /wp-includes
, wp-config.php
, etc.?
If so, you likely need to update the rewrite rules in your webserver configuration. By default, a multisite .htaccess
configuration has a rule like
RewriteRule ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
This says "if the URL path begins with /somesite/wp-content/whatever
then serve the file located at {ABSPATH}/wp-content/whatever
" (and the same for wp-admin
and wp-includes
).
Because uploads
is not factored into this or some other rule, no attempt is made to resolve the path to a file, and instead WordPress will end up processing the request as though that path is a permalink.
Add another rule above or below that line in order to account for your new location:
RewriteRule ^[_0-9a-zA-Z-]+/(uploads.*) $1 [L]