This is a must-use plugin to fix your uploads paths (URL & directory), for advanced paths customization for your wordpress intallation.
- WordPress is installed at /wp subdirectory.
//wp-config.php
define('WP_HOME', 'http://example.com');
define('WP_SITEURL', 'http://example.com/wp');
- WordPress front controller point to that directory
//index.php
/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp/wp-blog-header.php' );
- Content dir is at /, not subdirectory
define('WP_CONTENT_DIR', dirname(__FILE__) );
define('WP_CONTENT_URL', WP_HOME );
- Plugins are located in /extensions
define('WP_PLUGIN_DIR', WP_CONTENT_DIR . '/extensions');
define('WP_PLUGIN_URL', WP_HOME . '/extensions');
- Must use plugins located in /must
define('WPMU_PLUGIN_DIR', WP_CONTENT_DIR . '/must');
define('WPMU_PLUGIN_URL', WP_CONTENT_URL . '/must');
- Uploads placed in /media
define('UPLOADS', '../media'); // relative to ABSPATH, if you use only "media", it'd be "/wp/media"
However the uploaded files will have a URL like http://example.com/wp/../media/2017/01/media1.jpg
To fix this you place the PHP file into the /must
plugins directory.
If you want to put your uploads directory in "/media" (i.e.: http://yoursite.net/media) instead of "wp-content/uploads".