You are here:Home»KB»Web Design»CMS»Wordpress»My Wordpress Notes
Saturday, 21 January 2017 15:43

My Wordpress Notes

Written by

These are collection of my WordPress notes.

WordPress Platform

Security

  • Block xmlrc.php with htaccess (WordFence will do this for you)
    <Files xmlrpc.php>
      ErrorDocument 403 default 
      order deny,allow
      deny from all
    </Files>
  • Disable all of the search features with a plugin.

Debugging

Performance

Plugins

  • Divi has it's own page at QW.
  • Total Cache  - Control iframe embedding
    • If the 'self' flag is not set, Divi will not work on quantumwarp.com because it uses iframes.
    • I manually set the Header set Content-Security-Policy in the .htaccess file but it kept getting changed (As below) whenever i load this plugin in the admin area, it alters the .htaccess to match it's current configuration. As youo can see the 'self' statement gets removed which can cause issues.
      Header set Content-Security-Policy "frame-ancestors 'self' *.quantumwarp.com"
      
      -->
      
      Header set Content-Security-Policy "frame-ancestors *.quantumwarp.com"
    • The solution is to add this extra statement in Total Cache's configuration but it is hard to find.
      • Performance --> Browser Cache --> Security Headers --> frame-ancestors: 'self' *.quantumwarp.com
  • Wordfence blocking iframes
    • WF Firewall Blocking Header iframe | WordPress.org
      • As for your issue, it sounds like Learning Mode will be your friend here. From the Wordfence Dashboard click on Manage WAF. Then you will see Basic Firewall Options --> Web Application Firewall Status. Change the option to Learning Mode. Now perform the actions that were causing issues, such as visiting the page(s) containing the iframe code. This will help Wordfence learn that these actions are normal and it will allow them in the future. After you have finished performing the actions, switch the WAF from Learning Mode back to Enabled and Protecting. Now test to see if your iframe works correctly.
    • Firewall Learning Mode - Wordfence - "Learning Mode" allows the firewall to be adjusted to your site. is an amazing resource for learning more about the WAF and learning mode.
    • Disabling WordFence will fix this issue, but is not ideal and should only be briefly done to verify WordFence is the issue.
    • Blocking xmlrc.php
      • with htaccess - This is done on the server level.
      • If you use WordFence this will be done at the php level but allows more control rather than a blanket ban.
  • WordFence
    • To make your site as secure as possible, the Wordfence Web Application Firewall is designed to run via a PHP setting called auto_prepend_file, which ensures it runs before any potentially vulnerable code runs. This PHP function add the define file on the beginning of every file that is requested by a browser.
    • Check the WordFence logs and see what URL it is blocking, then you can add an exception.
Read 475 times Last modified on Friday, 29 March 2024 16:38