Remove multisite part from wordpress multisite upload directory

by Shamim Hasan   Last Updated July 02, 2018 18:08 PM

For multisite, there is shared (can be accessed from all sites) users and usermeta table, options table. So is there any shared upload directory?

if not, is there a way to reliably remove multisite part (eg. sites/2) from upload directory using upload_dir so that it always return main upload directory?

in _wp_upload_dir it is always NOT the case that it adds sites/2. so we cannot just remove that part. also i am not sure now get_site_option( 'ms_files_rewriting' ) is always return false or not (my wp minimum version requirement is 4.4).

so what should be my approach to get upload directory path without additional part for multisite?



Related Questions





front end post and uploads for custom post type

Updated April 25, 2018 14:08 PM