Editing Files From The WordPress Admin Panel

Teli Adlam —  January 3, 2006

One of the great things about WordPress is that you can edit your templates directly from the WordPress admin panel. Just navigate to the Presentation menu and right there, in the sub-menu, is the Edit Theme tab.

Some may be tempted to click on it and start editing until their heart is content without a second thought. Some may not even be aware of the potential damage that can be done to their layout.

When editing files from the WordPress admin panel, there is no undo button. Any changes you make and update are written directly into the file, and unless you have a back up somewhere, you cannot go back.

So, here are some tips for editing WordPress files:

  • Back up your files. Do not do anything before you do this.
  • Whenever possible, edit your files in a text/HTML editor where you will have access to the undo button.
  • If you do need to edit files on the server, copy and paste the current code into an outside document and save it as your backup, then make the necessary changes on the server.
  • If you don’t feel comfortable with HTML/PHP/CSS code, then it’s advised not to edit any files from the WordPress admin panel.

Teli Adlam

Posts

6 responses to Editing Files From The WordPress Admin Panel

  1. Where in this would you put a script that is supposed to go in the footer template just before the closing body tag ?This is the footer from the WP theme that I have installed.

    [Edit] – The code was removed because it has been modified beyond recognition by WP.

  2. Hi Robert,
    Since I don’t know which script or which template you’re referencing, I can only tell you which files and what code to look for :).

    The footer template is the footer.php file, and the closing body tag is </body>.

    So, if you were following the script instructions to the letter, you may do something similar to
    <script code>
    </body>

    Hope that helps out :)

    ~ Teli

  3. Thanks for the tips! I’ve just setup my first free wordpress blog and the next step will be to install my own copy of wordpress to my webspace. If i run into problems i know where to look now. :)

  4. Hi Ashampoo,
    Thanks for stopping by and leaving your comment.

    I’m glad you find the blog helpful and hope you’ll come back often.

    ~ Teli

  5. Except that in wp 2.5 it appears they’ve removed the ability to edit files from within wp admin. wtf? I don’t see any announcement on why they even did this, any ideas?

  6. lol nevermind. found it. they moved it to design -> theme editor