Problems with defining UPLOADS constant


I have a custom WordPress file-structure like


  • content (folder)

    • uploads (folder)
    • plugins (folder)
    • themes (folder)
      … and so on
  • wordpress (folder)

    • wp-admin (folder)
    • wp-includes (folder)
      … more folders
    • wp-blog-header.php
    • wp-load.php
    • wp-login.php
      … and all other wp core files




In my wp-config.php I have to define the path to my custom uploads folder like this:

if (!defined('UPLOADS')) {
    define('UPLOADS', '../content/uploads');

More or less out of nothing (maybe I updated the wp core) when trying to upload an image I get the error message saying: can’t create folder check if parent folder is writeable.

BUT: if I put the same code into the wp-blog-header.php file uploading and building new folders within the upload folder works.

I thought using DEFINE(in my case) means that I just save a string value to a constant and where ever I use the constant the value is the same. But how can it be that there is a difference when defining a constant in wp-config.php or wp-blog-header.php? (which is inside the subfolder wordpress .

For my changes in wp-blog-header.php would disappear after the next WordPress update I obviously can’t solve it that way.

Any ideas what the problem could be?

Luckyfella 3 years 2019-11-07T04:36:01-05:00 0 Answers 58 views 0

Leave an answer