If you enjoy the convenience and ease of theme editing through the dashboard of WordPress single user, here’s a way to bring that back into your workflow when you are editing MU template files. It can really slow you down if you need to transfer files via FTP in order to make a few simple edits. In this tutorial we are going to hack WPMU to allow us to have editing privileges through the dashboard with three simple steps.
Step. 1. Navigate to wp-admin/includes and locate the mu.php file.
Step 2. Search for “unset( $submenu['themes.php'][10]” and comment out the lines that disable the editor
Look for this:
unset( $submenu['plugins.php'][15] ); // always remove the plugin editor unset( $submenu['themes.php'][10] ); // always remove the themes editor
Change it to this:
/* unset( $submenu['plugins.php'][15] ); */ // always remove the plugin /* unset( $submenu['themes.php'][10] ); */ // always remove the themes
Step 3: You’ve enabled the editor but now you must give yourself (the administrator) permission to access these pages.
Search for: “if ( strpos( $_SERVER['PHP_SELF'], ‘user-new.php” in mu.php.
Look for this:
$pages = array( 'theme-editor.php', 'plugin-editor.php' ); foreach( $pages as $page ) { if ( strpos( $_SERVER['PHP_SELF'], $page ) ) { wp_die( __('Page disabled by the administrator') );
Change it to this:
$pages = array( 'theme-editor.php', 'plugin-editor.php' ); foreach( $pages as $page ) { if ( strpos( $_SERVER['PHP_SELF'], $page )&& !is_site_admin() ) { wp_die( __('Page disabled by the administrator') );
Congratulations – you’re finished! Log into your dashboard and you should be able to edit your theme files and your plugin files. I hope that this little hack will save you some time in editing. I tested this out on WordPress MU 2.8.6 and it worked perfectly. Many thanks to Sanjeev Mishra for his tutorial on this subject. Happy editing!





Nice!
Might there be a way to limit the files accessed via the editor. For example, only ’style.css’?
Thx
This is great, thanks! I’ve been looking for a way to edit themes/plugins in wpmu. Unfortunately, I just tried it without success. No editor in sight. I’m logged in as site administrator. Can you tell me how to troubleshoot?
Thanks for the post. Figuring out which things work in WPMU and which things are WP-only can be mindboggling.
&&
should be actual ampersands not the code as it reads or you will get an error about an unexpected ;
“&&
should be actual ampersands not the code as it reads or you will get an error about an unexpected ;”
Voila, there it is! Thank you both!
Yes, sometimes you have to change quotes or ampersands when copy and pasting because of the way WordPress outputs it when I paste code into a blog. Glad you have it working now!
Any thoughts on limiting editing to a single file?
This saved my bacon. You rockkkk!
Thank You very much, this is really helpful.
awesome. thanks!