Created
December 28, 2013 17:58
-
-
Save fitzhaile/8162164 to your computer and use it in GitHub Desktop.
Fix media directory location to be outside of wordpress root.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Fix media directory location to be outside of wordpress root | |
*/ | |
if ( empty( $upload_path ) || 'wp-content/uploads' == $upload_path ) { | |
update_option( 'upload_path', untrailingslashit( str_replace( 'wp', 'media', ABSPATH ) ) ); | |
update_option( 'upload_url_path', home_url( 'media' ) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment