define( 'UPLOADS', 'wp-content/uploads/private' );
Ref: https://codex.www.ads-software.com/Editing_wp-config.php#Moving_uploads_folder
]]>Thanks for your help! ??
]]>current:
]]>/** Absolute path to the WordPress directory. */
if ( !defined(‘ABSPATH’) )
define(‘ABSPATH’, dirname(__FILE__) . ‘/’);/** Sets up WordPress vars and included files. */
require_once(ABSPATH . ‘wp-settings.php’);
The file is independent of the DB in that it is not required in order to access the DB by other means. However, it contains the DB credentials that WP needs to access the DB. Some hosts have the DB on a completely different server than the server that contains wp-config.php.
]]>The remaining problem is there are likely references in the DB that still refer to the old location even though you’ve defined a new location and all the actual files reside in the new location. Most commonly these are references in post content to media files where the entire file path is part of post content. In other references, the path is determined by defined constants and the paths are updated automatically. Not so for post content and similar references.
To correct this, use the better search and replace plugin. Assuming your uploads are sorted into year folders, search for occurrences of “/wp-content/uploads/20” and replace with “/wp-content/uploads/private/20”. Including “/20” avoids adding a second private/ into URLs that are already correct.
If you don’t have year folders, you can let the double private/ path elements happen, then go back and search for the double occurrences and replace with just the single.
]]>