Can't edit WordPress files

How to Fix Can’t Edit WordPress Files

Quick Fix for One Potential Cause If You Can’t Edit WordPress Files

This is a quick post of a frustrating error I ran into recently. It includes a quick fix workaround that may help if you can’t edit WordPress files. I had recently upgraded WordPress to version 4.8.9 on a new site I was developing. I was using the WordPress Appearance Editor to do some simple edits of the style.css file in the site’s child theme. Everything was going fine. Then I hit a strange snag. All of a sudden, I can’t edit WordPress files in the Appearance Editor any longer.

The Appearance Editor would refuse to save the file and generated the following error:

Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over FTP.

Turning on the FireFox Tools -> Web Developer -> Network panel showed a 403 Forbidden error.

Something was blocking save access to the file.

I did quite a bit of troubleshooting. I finally tracked it down to a comment in the file. It was apparently being interpreted as a potential drop database command hack threat. I was working on CSS styling of a dropmenu and had created the following comment:

/* Dropmenu styling */

Apparently something was filtering the string: “/* Drop” string as a potentially dangerous drop database command. It was blocking save access to the style.css file as long as that specific string was included.

Drop Commond Error Screenshot - can't edit WordPress files

I then tested adding anything else to break up that string in the comment, such as adding a second space or any other letter before the word Drop. This finally allows the file to be saved again.

I tried this on another site running an older version of WordPress 4.8.7 on the same host and that site didn’t have this problem. So it could be a problem specific only to this particular site under development. But I figured I’d post it just in case anyone else runs into an issue where you can’t edit WordPress files and may have run into the same problem.

The following thread has a few more things to try if you can’t edit WordPress files due to other causes:

https://wordpress.org/support/topic/cant-edit-main-theme-php-files-after-upgrading-to-4-9/


DreamLight Can Design a Custom WordPress Web Site for You

WordPress Web Site DevelopmentNow that you know how to copy a live WordPress website to a local Mac you may want to hire a developer. If you are looking for a WordPress developer DreamLight can develop a custom WordPress website for you. We will work closely with your marketing team to update your existing Web site that may be outdated or to design a brand new custom WordPress Web site. We design all our custom WordPress Web sites to be fully responsive. This means the overall design layout automatically re-flows on-the-fly to take best advantage of all modern mobile devices. We can also create a wide range of integrated branded marketing content for your Web site to help it really stand out, including: 2D/3D digital design, illustration, animation, interactive multimedia or application development.

Contact us for more information about designing a custom WordPress Web site or to explore your specific needs.


Request a Free Quote Today!

DreamLight brings your dreams to light – digitally.


If you enjoyed this tutorial please consider making a donation to fund more!


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.