Title: Test Before Saving &#8211; Always returns error
Last modified: June 27, 2025

---

# Test Before Saving – Always returns error

 *  Resolved [Bobs Bee](https://wordpress.org/support/users/markmccarricksig/)
 * (@markmccarricksig)
 * [11 months, 2 weeks ago](https://wordpress.org/support/topic/test-before-saving-always-returns-error/)
 * Hello Webfactory and Alexandru,
 * I’m trying to implement some header changes on my wordpress.com based site. I’ve
   noticed that no matter what I try, even if the box is blank, when I click ‘Test
   Before Saving’ the syntax editor tells me there’s an error.
 * Here’s the code I actually want to enter:
 *     ```wp-block-code
       #Security Headers<IfModule mod_headers.c>    Header always set X-Frame-Options "SAMEORIGIN"    Header always set X-Permitted-Cross-Domain-Policies "none"    Header always set Cross-Origin-Embedder-Policy "unsafe-none"    Header always set Cross-Origin-Opener-Policy "same-origin"    Header always set Cross-Origin-Resource-Policy "same-origin"    Header always set Referrer-Policy "strict-origin-when-cross-origin"    Header always set X-Content-Type-Options "nosniff"    Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"    Header always set Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline';"</IfModule>#End Security Headers
       ```
   
 * Any idea why the editor is test failing? Would it be safe to continue with the
   above code regardless?
 * Thanks,
 * BB
 * ![](https://i0.wp.com/sigdistribution.co.uk/wp-content/uploads/2025/06/wp-access-
   2.png?ssl=1)
 * ![](https://i0.wp.com/sigdistribution.co.uk/wp-content/uploads/2025/06/wp-access-
   1.png?ssl=1)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Alexandru Tapuleasa](https://wordpress.org/support/users/talextech/)
 * (@talextech)
 * [11 months, 2 weeks ago](https://wordpress.org/support/topic/test-before-saving-always-returns-error/#post-18531307)
 * Hi,
 * It’s hard to say… sometimes it can be a “false positive” where the update is 
   OK but just the test is failing, but it’s risky. The test basically involves 
   making the .htacces update and then making a request to homepage to see if it
   still works as expected. I guess in some cases there can be a firewall or some
   other issue that breaks the test. But like I said, don’t do it unless you have
   access to restore the .htaccess file FTP or your hosting panel.

Viewing 1 replies (of 1 total)

The topic ‘Test Before Saving – Always returns error’ is closed to new replies.

 * ![](https://ps.w.org/wp-htaccess-editor/assets/icon-256x256.png?rev=2010639)
 * [Htaccess File Editor - Safely Edit Htaccess File](https://wordpress.org/plugins/wp-htaccess-editor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-htaccess-editor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-htaccess-editor/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-htaccess-editor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-htaccess-editor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-htaccess-editor/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Alexandru Tapuleasa](https://wordpress.org/support/users/talextech/)
 * Last activity: [11 months, 2 weeks ago](https://wordpress.org/support/topic/test-before-saving-always-returns-error/#post-18531307)
 * Status: resolved