Skip to content

Instantly share code, notes, and snippets.

@fitzhaile fitzhaile/config.php
Created Dec 28, 2013

Embed
What would you like to do?
Fix media directory location to be outside of wordpress root.
<?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
You can’t perform that action at this time.