Requires a wp-content folder to exist
-
Hi,
I had troubles to get your plugin working with our custom installation of wordpress.
After digging around, I found that the wp-content folder is hardcoded in the UploadsWebpcDirectory class and it requires to exist to have the uploads folder selectable in the settings panel.
Note, that this happen even by using the custom filter.
Also, I would point to your attention that you use ABSPATH as default folder, but you should maybe have a look at WP_CONTENT_DIR which defaults to ABSPATH . ‘/wp-content’ in standard wordpress installation and allows you to get rid of the wp-content folder.
We use that setting in conjunction of WP_CONTENT_URL to provide a custom cookie free no php domain to deliver all plugins/themes/uploads static assets (js, css, medias…).
Our custom directory structure is:
/src/
|
|—- app/. <- directory root of our https://media.domain.TLD
. |
. |- languages/
. |- plugins/
. |- themes/
. |- uploads/
. |- webp/ <- output folder of webp converted files
|
|—- www/ <- directory root of out https://domain.TLD with wordpress core onlyTo get your plugin working I needed to create an empty /src/app/wp-content/uploads.
Hope it helps,
- The topic ‘Requires a wp-content folder to exist’ is closed to new replies.