• Resolved mkornegay2

    (@mkornegay2)


    Wordfence is slowing my site down a lot. I deactivated it and it cut my page load time in half. From 6 sec down to 3 or less. My Speed Index went from a 3+ sec to a 972ms. So something is definitely going on. I have reCaptcha V3 enabled on login and basically other than trying to block some random IPs, everything is default. I’m also running PHP 7.4. I’ve seen other topics on this and they said installing and uninstalled several times fixed it for them. Not sure why that did unless updates are not clearing out old, outdated code, but there needs to be a solution to this other than removing the plugin. Yet, I’m not sure that would help either. I don’t want to have to reconfigure or add all my blocked IPs back. Any help?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @mkornegay2, thanks for getting in touch.

    If you do wish to perform a number of removal/resets on Wordfence to see if it helps in your case, the following page has instructions along with how to import/export your Wordfence settings so you don’t lose them: https://www.wordfence.com/help/advanced/remove-or-reset/

    Whilst we are constantly working on making the plugin faster, perform better, and use less resources, there are not set amounts of RAM, CPU or database queries that we know Wordfence will definitely require in each use-case or hosting environment. The cases of slow-down are small in relation to the quantity of customers using Wordfence, but does crop up from time to time with certain configurations or larger databases/number of installed plugins.

    For a screenshot of my recommended Performance setting options – Click Here.

    You could also set max_execution_time = 60 in php.ini, Wordfence’s scan only ever attempts to use half of this value by default.

    Your WP_MEMORY_LIMIT should be set to 128M or 256M in wp-config.php. WooCommerce, for example, recommend 64M minimum, so if you also have many hits on the site at once especially during a Wordfence scan, a lower limit here could be reached fairly easily. Your PHP memory_limit value should be set to 128M or 256M also to accommodate this change otherwise there won’t be enough room for WordPress to use the higher value it is requesting.

    Let me know how all that goes!

    Peter.

    Thread Starter mkornegay2

    (@mkornegay2)

    Hi Peter,

    I will test the install/uninstall method and export my setup. As for performance settings here are my settings.

    PHP: memory_limit = 256M
    max_execution_time = 300

    I just added define( ‘WP_MEMORY_LIMIT’, ‘256M’ ); to my wp-config.php file as it was not set.

    Now when I say that is slows my page load, this is not in relation to site scans which should be done in off hours. It during normal hours just navigating the site. I also see this in my PHP Errors List

    Warning (Suppressed)	chmod(): Operation not permitted	1	
    wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php:443
    chmod()
    wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php:443
    wfWAFStorageFile->_open()
    wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php:431
    wfWAFStorageFile->open()
    wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php:610
    wfWAFStorageFile->fetchConfigData()
    wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php:564
    wfWAFStorageFile->getConfig()
    wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/utils.php:1063
    wfWAFUtils::rawPOSTBody()
    wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/request.php:384
    wfWAFRequest::createFromGlobals()
    wp-content/plugins/wordfence/waf/bootstrap.php:46
    wfWAFWordPressRequest::createFromGlobals()
    wp-content/plugins/wordfence/waf/bootstrap.php:928
    Plugin Support wfpeter

    (@wfpeter)

    Hi @mkornegay2,

    max_execution_time being 300 should be changed to the 60 we recommend as higher numbers are confirmed to have caused issues on other setups. The longer wait time means pages will halt longer for slow processes, or even communications that never return anything, so will just naturally slow page loads even when that’s not your intention.

    The file operation errors could be linked to running Query Monitor or similar tools as they can display warnings like this for silent failures. We sometimes utilize WordPress’ $wpdb->suppress_errors(true); function in situations we know an error may occur. One such example may be when you’re using the MySQLi engine for logs instead of files so we just want any attempts to write to these files to fail silently if they don’t exist. Query Manager, and possibly other tools can ignore this intentional error suppression inbuilt into WordPress and present them as issues.

    Thanks,

    Peter.

    Thread Starter mkornegay2

    (@mkornegay2)

    I understand as long as the errors are not affecting my site in anyway. However, on max execution time, my page builder software requires at least 120 for importing and loading so that’s why its high; to prevent timeouts. I took it down to 120 server wide to see how it may affect the backend.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Wordfence is slowing my site’ is closed to new replies.