Correctly using the root directory for media uploads?


I am aware what I’m attempting to do is not recommended – please don’t reply just to tell me this.

I have set the uploads directory to root by adding define( 'UPLOADS', '' ); to wp-config.php, which works fine except the URLs for my uploads end up with a double slash ( The address I’ve defined for my website in the General settings does not have a trailing slash.

While this doesn’t break anything, it looks a little peculiar in the event anyone copies the URL, so it would be preferable to resolve. So far I’ve tried using an absolute URL as per this answer (doing so just results in and inserting a backspace character as per this answer, which was a bit of a longshot.

, spacer GIF 4 years 2020-02-09T08:38:22-05:00 0 Answers 70 views 0

Leave an answer