WordPress is usually good except sometimes when you encounter an error due to something else.
While working on Nexus, I encountered an issue while modifying Genesis theme files using the WordPress Editor.
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.
This is how it looked seem.
As usual, I went through the following troubleshooting steps.
Check Theme Permission
One of the first things you got to check the theme files and folder permissions.
If you are running on shared hosting then mostly it would be alright. However, if using VPS or Cloud then you got to ensure the same user owns theme files as web server (Nginx or Apache HTTP) running.
I am using Nginx on Google Cloud, and it was running with
www-data user. Permission looked ok, but I changed it again to ensure if there was any file had wrong.
chown -R www-data:www-data gf
Note: you got to find the user and change www-data with yours. You can use
ps command to see it.
ps -ef |grep nginx #if using Nginx ps -ef |grep http #if using Apache HTTP
Once changed, try to update the files to see it works.
It didn’t work for me.
Check Security Plugins
Are you using any security plugins? Do you have the option to check their logs to see how exactly your request is being treated?
Alternatively, you can quickly disable the security plugin and verify if that works.
Did it help? It didn’t to me.
Check Cloud-based Security (WAF)
Are you using cloud-based security provider WAF? Check the firewall logs to see if its getting challenged or blocked by them?
Guess what, I am using Cloudflare and that was causing an issue.
After spending some good time, I found that Cloudflare WAF was challenging “Update files” requests.
It was getting challenged by multiple security rules (SQL injection, XSS, etc).
I whitelisted my IP in the WAF event details and then it was all ok.
If you are using Cloudflare, you can check the firewall logs by logging into the dashboard. However, if you are using something else then worth checking their logs or contact the support to confirm if its due to WAF.
I was able to fix my issue and hope this helps you.
More great readings on WordPress
Understanding 301 Redirects for BeginnersTanish Chowdhary on June 16, 2022
A2 Managed WordPress Hosting is for The Professional BloggerHitesh Sant on June 10, 2022
Top 8 Platforms to Hire WordPress DevelopersGeekflare Editorial on June 6, 2022
Start Your Online Shop Today with Nexcess StoreBuilderHitesh Sant on May 25, 2022
How to Protect Your WordPress Site with iThemes Security ProHitesh Sant on May 7, 2022
6 Best WordPress Accessibility Plugins in 2022Tamal Das on April 22, 2022
Join Geekflare Newsletter
Every week we share trending articles and tools in our newsletter. More than 10,000 people enjoy reading, and you will love it too.