Contents

Manage → Files

There are many user editable files in a standard WordPress installation. Examples include your theme templates, .htaccess, and my-hacks.php. In this Files SubPanel, these files can be accessed and modified to suit your needs.

Built-in File Editor

The Built-in File Editor allows you to view any file, and edit any file which is writeable (see Changing File Permissions). At the bottom of the SubPanel is a box called "Other Files". By entering any file name in the text box here and clicking the "Edit file" button, the Built-in Editor can be used to view/edit that file. The large text box displays the contents of the selected file and allows you to modify those contents.

After editing a file's contents in the large text box, click the "Update File" button to save your changes.

Additionally, the editor provides you with some handy links:

Recent

The five most recent files you have viewed with the Built-in File Editor.

Common

A list of files that are common to your entire blog, no matter the Theme you're using. Files include: .htaccess (see also this section of Introduction to Blogging, the Main Template for your blog (your blog's base index.php which is, by default, nearly empty), and my-hacks.php. This list will also include any legacy theme files from your base directory if you have any.

Some Caveats about the Built-in Editor:

To edit a file, the permissions for that file must be set to 666. Use your FTP program to CHMOD 666 any files you wish to edit using the WordPress template editor.

Changes you make are instant, and you do not need an ftp program after initially uploading the files and setting permissions.

There is no backup: a mis-edit may cost you necessary information.

Making a mistake when editing your .htaccess file can take down your site, and with it the WordPress editor. Make sure you have ftp access when editing .htaccess (your rewrite rules) so you can delete the bad file if necessary.

Editing in General

Take note of these file editing tips. They really are useful. Really.

Good Practice

After you have selected the Template tag and the file you wish to edit, then before making any changes at all, right-click in the text box, choose 'Select All' then choose 'Copy'. Paste the highlighted text into a new text document on your computer then SAVE. That is your backup.