Enabling Theme Editor in Wordpress MU

Note: a link on the issue for WP >= 2.8.1 can be found at http://mu.wordpress.org/forums/topic/13318?replies=6

The theme editor in Wordpress is a nice little feature which allows administrators to, via the brower, edit the theme files available to the Wordpress installation.

For security reasons however, this feature is not part of Wordpress, the risk being that if the editor is available, then someone with access to it might maliciously change code.

If such a security risk is not a problem though and you want to enable the theme editor, you must do two things:

1. the file theme-editor.php is not included with Wordpres MU. So get a copy of it from a standard Wordpress source (it is under ‘/wp-admin/’) and place it under the ‘/wp-admin/’ folder of your Wordpress MU installation.
2. Edit line # 401 of the file ‘/wp-admin/includes/mu.php’ by commenting out or deleting the line:

unset( $submenu['themes.php'][10] );

For more on the perils of the theme editor in Wordpress MU and a neat plugin which allows users to make a copy of a system theme just for their blog, check out http://wpmudev.org/project/Userthemes-1.1

Tags: ,

Related Posts

9 Responses to “Enabling Theme Editor in Wordpress MU”

  1. Edwin Maolana Says:

    It works.. thanks very much.

  2. Theme Create Says:

    Great Post!!! Wordpress is my favorite CMS and this information is a perfect example why.

  3. eric Says:

    In 2.7.1 it’s line 531…. works perfect… i dunno why they don’t have it on as the default… who wouldn’t want to edit?!?!

  4. takien Says:

    hi. that’s not workin on wpmu 2.8.1

  5. eric Says:

    here’s an updated permalink for the issue

    http://mu.wordpress.org/forums/topic/13318?replies=6

  6. Sean Ham Says:

    Don’t forget this part:
    line 1190
    from :”if ( strpos( $_SERVER['PHP_SELF'], $page ) ) {”
    to:”if ( strpos( $_SERVER['PHP_SELF'], $page ) && !is_site_admin() ) {”

  7. Luis Fernando Says:

    You also need to change in the wp.php file

    From:
    “if ( strpos( $_SERVER['PHP_SELF'], $page ) ) {”

    to:
    “if ( strpos( $_SERVER['PHP_SELF'], $page ) && !is_site_admin() ) {”

  8. Louis_Dea Says:

    Thx for this post.

    With the last comment by Luis, it works perfectly.

  9. Madison Brown Says:

    i host 5 of my blogs on Blogspot and it is really good for beginners. but if you want something with more features, nothing beats wordpress–:

Leave a Reply