Title: dabricksz's Replies | WordPress.org

---

# dabricksz

  [  ](https://wordpress.org/support/users/dabricksz/)

 *   [Profile](https://wordpress.org/support/users/dabricksz/)
 *   [Topics Started](https://wordpress.org/support/users/dabricksz/topics/)
 *   [Replies Created](https://wordpress.org/support/users/dabricksz/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/dabricksz/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/dabricksz/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/dabricksz/engagements/)
 *   [Favorites](https://wordpress.org/support/users/dabricksz/favorites/)

 Search replies:

## Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordfence Security - Firewall, Malware Scan, and Login Security] PHP Error on wpCLI – WP Engine Hosted](https://wordpress.org/support/topic/php-error-on-wpcli-wp-engine-hosted/)
 *  Thread Starter [dabricksz](https://wordpress.org/support/users/dabricksz/)
 * (@dabricksz)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/php-error-on-wpcli-wp-engine-hosted/#post-13799500)
 * [@wfadam](https://wordpress.org/support/users/wfadam/) anything on this?
 *  We had to enable another WAF for the time being in order to stay pci compliant…
   unfortunately There was no indication that the plugin did not function properly.
   
   It would be great if there was some sort of indicator that shows the plugin was
   only functioning on my php-cli, but not on the server instance. ESPECIALLY being
   that pci compliance requires having a WAF active.
 * The only reason I even knew something was wrong was because I was using wpcli,
   which most users will never do, so to me this is concerning.
 * I understand it can be some sort of configuration issue related to my hosting,
   so I’m not blaming Wordfence in any way. Its a free plugin and works in most 
   scenarios. I appreciate the work put in to make this the top WAF for WordPress.
 *  I was going to purchase a premium version as well, but have to hold off as the
   plugin is not functioning on my site, and cant justify paying for something that
   doesn’t currently work for us. I hope we can resolve this, so I can proceed with
   a premium plan.
 * Thanks.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordfence Security - Firewall, Malware Scan, and Login Security] PHP Error on wpCLI – WP Engine Hosted](https://wordpress.org/support/topic/php-error-on-wpcli-wp-engine-hosted/)
 *  Thread Starter [dabricksz](https://wordpress.org/support/users/dabricksz/)
 * (@dabricksz)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/php-error-on-wpcli-wp-engine-hosted/#post-13788948)
 * [@wfadam](https://wordpress.org/support/users/wfadam/) contents of those files
   were sent as requested. Thanks for getting back to me.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordfence Security - Firewall, Malware Scan, and Login Security] PHP Error on wpCLI – WP Engine Hosted](https://wordpress.org/support/topic/php-error-on-wpcli-wp-engine-hosted/)
 *  Thread Starter [dabricksz](https://wordpress.org/support/users/dabricksz/)
 * (@dabricksz)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/php-error-on-wpcli-wp-engine-hosted/#post-13773807)
 * [@wfadam](https://wordpress.org/support/users/wfadam/) I have tried all the initial
   troubleshooting instructions.
 * I first tried adding the line to wordfence-waf.php on my production env.
    I then
   tried to add it to wp-config.php also on production env.
 * neither worked.
 * I then tried deleting wflogs directory on my staging copy, however i still received
   the same errors.
 * Here is command line response for these troubleshooting options:
 *     ```
       $ cat wordfence-waf.php
       <?php
       define('WFWAF_STORAGE_ENGINE', 'mysqli');
       // Before removing this file, please verify the PHP ini setting <code>auto_prepend_file</code> does not point to this.
       if (file_exists('/nas/content/live/staging.mywebsite.com/wp-content/plugins/wordfence/waf/bootstrap.php')) {
               define("WFWAF_LOG_PATH", '/nas/content/live/staging.mywebsite.com/wp-content/wflogs/');
               include_once '/nas/content/live/staging.mywebsite.com/wp-content/plugins/wordfence/waf/bootstrap.php';
       }
       ?>
   
       $ ls wp-content/wflofgs
       ls: cannot access 'wp-content/wflofgs': No such file or directory
   
       $ wp
       PHP Warning:  fopen(/sites/staging.mywebsite.com/wp-content/wflogs/rules.php): failed to open stream: No such file or directory in /sites/staging.mywebsite.com/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 325
       Warning: fopen(/sites/staging.mywebsite.com/wp-content/wflogs/rules.php): failed to open stream: No such file or directory in /sites/staging.mywebsite.com/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 325
       PHP Warning:  flock() expects parameter 1 to be resource, bool given in /sites/staging.mywebsite.com/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 326
       Warning: flock() expects parameter 1 to be resource, bool given in /sites/staging.mywebsite.com/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 326
       PHP Warning:  include(/sites/staging.mywebsite.com/wp-content/wflogs/rules.php): failed to open stream: No such file or directory in /sites/staging.mywebsite.com/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 328
       Warning: include(/sites/staging.mywebsite.com/wp-content/wflogs/rules.php): failed to open stream: No such file or directory in /sites/staging.mywebsite.com/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 328
       PHP Warning:  include(): Failed opening '/sites/staging.mywebsite.com/wp-content/wflogs/rules.php' for inclusion (include_path='.:/usr/share/php:/sites/staging.mywebsite.com/wp-content/plugins/myworks-woo-sync-for-quickbooks-online/includes/lib/quickbooks-lib') in /sites/staging.mywebsite.com/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 328
       Warning: include(): Failed opening '/sites/staging.mywebsite.com/wp-content/wflogs/rules.php' for inclusion (include_path='.:/usr/share/php:/sites/staging.mywebsite.com/wp-content/plugins/myworks-woo-sync-for-quickbooks-online/includes/lib/quickbooks-lib') in /sites/staging.mywebsite.com/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 328
       PHP Warning:  flock() expects parameter 1 to be resource, bool given in /sites/staging.mywebsite.com/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 329
       Warning: flock() expects parameter 1 to be resource, bool given in /sites/staging.mywebsite.com/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 329
       PHP Warning:  fclose() expects parameter 1 to be resource, bool given in /sites/staging.mywebsite.com/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 330
       Warning: fclose() expects parameter 1 to be resource, bool given in /sites/staging.mywebsite.com/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/waf.php on line 330
       ```
   
 * this did not resolve the issue as shown. The php error still pops up and I’m 
   still not seeing any ip or country blocks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordfence Security - Firewall, Malware Scan, and Login Security] PHP Error on wpCLI – WP Engine Hosted](https://wordpress.org/support/topic/php-error-on-wpcli-wp-engine-hosted/)
 *  Thread Starter [dabricksz](https://wordpress.org/support/users/dabricksz/)
 * (@dabricksz)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/php-error-on-wpcli-wp-engine-hosted/#post-13773246)
 * Thanks for responding! [@wfadam](https://wordpress.org/support/users/wfadam/)
 * As requested, I have sent the diagnostic report.
 *   Forum: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
   
   In reply to: [Moving from dev to hosting on the same server](https://wordpress.org/support/topic/moving-from-dev-to-hosting-on-the-same-server/)
 *  [dabricksz](https://wordpress.org/support/users/dabricksz/)
 * (@dabricksz)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/moving-from-dev-to-hosting-on-the-same-server/#post-13768837)
 * changing DNS will direct URL to your server only. If you are only worried about
   the URL and not the data on old site, then yes that SHOULD work, but yes you 
   may also want to run a search and replace on the database (with a plugin, wpcli,
   or directly on database) for good measure to make sure all of the references 
   to the old URL are removed and replaced with new one.
 * If you need any user accounts, logins, or other data you will also need to import
   the database from the old site.
    -  This reply was modified 5 years, 8 months ago by [dabricksz](https://wordpress.org/support/users/dabricksz/).

Viewing 5 replies - 1 through 5 (of 5 total)