Roots Discourse

Bedrock with Default WordPress Theme (cannot upload to Media Library)


I’m having the exact same problem described here, The upload media in the local (vagrant:homestead) wordpress library is not working.

I’m using MAMP for Mac and set Bedrock up as described in the docs, and using the default 2021 theme as well. When I try to upload to the “Media Library” via the back-end, I get an error msg stating “Something went wrong. Try again later.” and then I get logged out - bizarre.

I set up a normal WordPress install and everything works grand on it.

P.S. I have both installs in the same place, and as far as I can see there is no difference in permissions.



What is exactly logged in the PHP (error) logs? The WordPress error message is very vague.
Bedrock changes some WordPress paths so the WordPress core, plugins and data (uploads directory) are separated. Some plugins have quality issues where they hard-code some paths and urls instead looking them up, e.g. upload directory and plugins folder. This will cause these plugins to not work correctly with Bedrock sites.

Sorry for the late reply - I actually managed to resolve this myself.

I noticed that when I was in the admin area, the URL was localhost//wp (double slash). So what I did was change my ports to remove the port number completely, then updated my .hosts file via Terminal, rebooted MAMP, updated the URL in the .env file and hey presto, I can upload as many images as I like (or so it seems so far!).

This topic was automatically closed after 42 days. New replies are no longer allowed.