This morning when I tried to edit the header.php file, the wordpress theme editor was not working properly. I kept getting redirected to the index page of my website. This was really annoying as I did not understand what was going wrong. Then I searched around for some solutions and found that there are various reasons for wordpress theme editor not working properly.
Now, if you are getting redirected to the index page when editing a theme file, then you should check for following things :
- If you have any firewall plugin then deactivate it.
- In most cases WordPress Firewall 2 causes the problem
- Edit the theme file
- Activate the plugin again
If this did not work for you, then try one of the following methods :
Changing Permissions to fix WordPress Theme Editor Not Working Problem
- Try changing the permissions of the file you are trying to edit.
- See if it is, chmod to 644 or not.
- Try editing the file through wordpress editor again.
- If it does not work, change the permission to 777.
- Try editing the file again using wordpress theme editor.
- If it works, change the permissions back to 644 once you are done editing.
Using FTP Client to fix WordPress Theme Editor Not Working Problem
- Download a FTP client, such as FileZilla or WinSCP.
- Browse to theme directory of your blog.
- Open the file you wanted to edit and perform necessary changes.
- Save the file.
- This will work with under any circumstances.
Changing Browser to fix WordPress Theme Editor Not Working Problem
This may sound weird but sometimes this proves to be a solution for most of the things. Just change your browser and try editing the files again. This even might be a cache problem or something, so you can even clear your cache and cookies before giving a shot at it. If you are lucky enough, it might just work for you.
Deactivate and Activate WordPress Plugins
The last thing you can try out is, log in to your admin panel, go to Installed Plugins tab. Deactivate all the plugins and then try editing the theme files using wordpress theme editor. If it works properly, then start activating plugins one at a time and simultaneously testing whether the theme editor is functioning properly or not. Once you find the plugin which creates the problem, just deactivate it or find an alternate plugin.
Replacing WP-Admin Folder on WordPress Blog
If you recently upgraded from an older version, then you can download the zip file of your current version from the worpdress site. Extract only the wp-admin folder in you hard drive. Upload and replace the existing files in your current wp-admin folder. Before doing so, take the backup of current folder so that just in case if something goes wrong, you can reupload the backup and make the site fully functional again.
In most of the cases one of the above method will surely work for you. If this is not the case, then I would suggest you to open a thread on the official wordpress support forum. You will definitely get some help from there. The last alternative would be to hire some professional to do the task for you.
I hope this article was beneficial for you and now you are aware about what you are expected to do when your wordpress theme editor does not work. If you have any more suggestions on how to make the theme editor work properly, you are kindly requested to post them using the form below.