Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #31371
    Nils Hilbers
    Guest

    Hi Boldgrid,

    The website keeps getting critical errors.
    There seems to be a conflict between nav-menus.php and the W3-total-cache plugin.
    As a result we can not change the Menu in WordPress under the Appearance button.
    But when we deactivate the W3TC plugin the website has a 500 error.

    This is the websites info:
    – WordPress version 5.5.3
    – Current theme: Avada (version 7.1.1)
    – Current plugin: W3 Total Cache (version 0.15.0)
    – PHP version 7.4.6

    Error Details
    =============
    An error of type E_ERROR was caused in line 119 of the file /www/wp-content/plugins/w3-total-cache/Cache_File.php. Error message: Allowed memory size of 268435456 bytes exhausted (tried to allocate 4198400 bytes)

    Can you help?
    Thanks

    Nils Hilbers

    #31401
    Jesse Owens
    Keymaster

    Hi Nils-

    Generally speaking, W3 Total Cache shouldn’t be having any effect on the back-end of your website, like updating menus. Be sure to double-check Performance > Page Cache and make sure that you have Don’t cache pages for logged-in users. Did you get any errors or warnings while trying to update your menus?

    The error you received during deactivation is that the PHP Memory limit was exceeded. It looks like your site is limited to about 256M of memory, so you might want to consider updating your PHP memory_limit value to something like 512M. You can also increase the memory limit in your wp-config.php file using a line like:

    define('WP_MEMORY_LIMIT', '512M');
    
    #31444
    Nils Hilbers
    Guest

    Hello Jesse Owens,

    Thanks for your quick answer.
    I checked teh settings, and they are like you said: Don’t cache pages for logged-in users.

    But when we visit ou WordPress-page: https://yaviva.nl/wp-admin/nav-menus.php it does not show any menu’s. The website is alright, it is just in WordPress.


    Can you help us with deactivating the W3TC plugin?
    When we deactivate the W3TC plugin the website is gone and shows a 500 error on http://www.yaviva.nl.
    Any ideas why?

    Please let us know.

    Best regards,
    Nils Hilbers

    #31452
    Jesse Owens
    Keymaster

    Hi Nils-

    Did you get a chance to check your nav-menus.php page for errors? It sounds like there might be a JavaScript conflict, which you might be able to diagnose by checking your Browser’s error console. Here’s a quick video on how to check your browser’s error console:

    I want to reiterate that I strongly suspect that W3 Total Cache isn’t the root cause of the issues with your menu editor, however there are a couple of different ways to get around the error you’re seeing when you try to deactivate.

    1. Increase your PHP Memory Limit. Most hosting providers will provide a method to do this in your hosting panel, or you can use the method I outlined above by adding the line to define the memory limit in your wp-config.php file:

    define('WP_MEMORY_LIMIT', '512M');

    2. Deactivate W3 Total Cache manually. You can use your hosting panel’s file manager, FTP, or SSH to delete the wp-content/plugins/w3-total-cache directory and the /wp-content/cache directory, and remove all of the lines from your .htaccess file that are in between the lines commented #Begin W3TC and #End W3TC.

    3. Use this trick to increase your PHP memory limit for a single WP-CLI command. If you have SSH access to your site, and WP-CLI installed, log in and run the following command:

    php -d memory_limit='512M' $(which wp) plugin deactivate w3-total-cache
    #31476
    Nils Hilbers
    Guest

    Hello Jesse,

    We want to deactivate the W3TC plugin on http://www.yaviva.nl.
    So we followed your steps.

    1. Deactivate W3 Total Cache manually.
    2. delete the wp-content/plugins/w3-total-cache directory + the /wp-content/cache directory (using FTP)
    3. Edit the .htaccess file: remove code between the lines commented #Begin W3TC and #End W3TC.

    But now we get a HTTP ERROR 500 on the website.

    Should we wait?

    Please let us know.

    Best regards,
    Nils Hilbers

    #31467
    Nils Hilbers
    Guest

    Hello Jesse,

    Thanks for the customizer&console tip.
    We found an missing image that made an error, but no the errors.
    The missing image error is resolved.

    – – –
    About enlarging the PHP Memory Limit.
    When I place the code define( ‘WP_MEMORY_LIMIT’, ‘512M’ ); in the wp-config.php file, we get this message: Scrape nonce check failed. Please try again.
    So that sadly didn’t work.

    What did we do wrong?

    Best regards,
    Nils Hilbers

    #31468
    Nils Hilbers
    Guest

    For your information.
    Our wp-config.php file looks like this.

    <?php
    /**
     * Extra files & functions are hooked here.
     *
     * Displays all of the head element and everything up until the "site-content" div.
     *
     * @package Avada
     * @subpackage Core
     * @since 1.0
     */
    
    // Do not allow directly accessing this file.
    if ( ! defined( 'ABSPATH' ) ) {
    	exit( 'Direct script access denied.' );
    }
    
    if ( ! defined( 'AVADA_VERSION' ) ) {
    	define( 'AVADA_VERSION', '7.1.1' );
    }
    
    if ( ! defined( 'AVADA_MIN_PHP_VER_REQUIRED' ) ) {
    	define( 'AVADA_MIN_PHP_VER_REQUIRED', '5.6' );
    }
    
    if ( ! defined( 'AVADA_MIN_WP_VER_REQUIRED' ) ) {
    	define( 'AVADA_MIN_WP_VER_REQUIRED', '4.7' );
    }
    
    // Developer mode.
    if ( ! defined( 'AVADA_DEV_MODE' ) ) {
    	define( 'AVADA_DEV_MODE', false );
    }
    
    /**
     * Compatibility check.
     *
     * Check that the site meets the minimum requirements for the theme before proceeding.
     *
     * @since 6.0
     */
    if ( version_compare( $GLOBALS['wp_version'], AVADA_MIN_WP_VER_REQUIRED, '<' ) || version_compare( PHP_VERSION, AVADA_MIN_PHP_VER_REQUIRED, '<' ) ) {
    	require_once get_template_directory() . '/includes/bootstrap-compat.php';
    	return;
    }
    
    /**
     * Bootstrap the theme.
     *
     * @since 6.0
     */
    require_once get_template_directory() . '/includes/bootstrap.php';
    
    /* Omit closing PHP tag to avoid "Headers already sent" issues. */
    #31485
    Jesse Owens
    Keymaster

    Hello Nils-

    It looks like you might be editing your theme’s functions.php file and not wp-config.php, the code you’ve posted looks pretty identical to functions.php of the Avada theme.

    The 500 error is likely due to a typo in .htaccess or one of the files you modified. You should check your server’s Apache error log or enable WP_DEBUG_DISPLAY so that we can see what the error message is that’s causing your 500 error.

    One thing you can try is to replace your .htaccess file with the WordPress Default (make sure to keep a backup of your existing one).

    You might also want to consider restoring a backup of your website so that you can get back to a functional state. Your hosting provider may also be able to provide assistance locating the error and resolving it.

    #31486
    Nils Hilbers
    Guest

    Hello Jesse,

    Your code is now in the wp-config.php file.
    But that doesn’t do anything.
    Our PHP Memory Limit = still 156 MB
    At least that is what the Avada System Status says.

    – – –
    We tried deinstalling W3TC
    With your 3 steps, but no luck.
    After that again the ERROR 500 on the website.

    So we used a back-up, an now we are back where we started.

    What else can we do?

    Best regards,
    Nils Hilbers

    #31507
    Jesse Owens
    Keymaster

    Hi Nils-

    I’m glad to hear that the site’s back up and running!

    At this point, I’d recommend updating the PHP memory limit directly from your hosting control panel. It looks like your host has a menu item called PHP Settings where you can control this setting. I’d try going to at least 512M.

    #31707
    Nils Hilbers
    Guest

    Hello Jesse,

    We moved the website to a different server.
    (Neostrada)

    the PHP memory = 512 MB

    Here are the new info:
    WordPress Environment
    Home URL: [?] https://yaviva.nl
    Site URL: [?] https://yaviva.nl
    WP Content Path: [?] /home/yaviva1q/public_html/wp-content
    WP Path: [?] /home/yaviva1q/public_html/
    WP Version: [?] 5.5.3
    WP Multisite: [?] –
    PHP Memory Limit: [?] 512 MB
    WP Debug Mode: [?] –
    Language: [?] en_US

    Server Environment
    Server Info: [?] Apache
    PHP Version: [?] 7.4.12
    PHP Post Max Size: [?] 8 MB
    PHP Time Limit: [?] 0
    PHP Max Input Vars: [?] 5000
    ZipArchive: [?] ✔
    MySQL Version: [?] 5.5.5
    Max Upload Size: [?] 2 MB
    DOMDocument: [?] ✔
    WP Remote Get: [?] ✔
    WP Remote Post: [?] ✔
    GD Library: [?] 2.2.5

    No error messages yet…..
    I will keep you up to date.

    Bye,

    Nils Hilbers

    #32061
    Nils Hilbers
    Guest

    Hi Jesse,

    We moved the website to a new host, where we could change the PHP memory limit directly from our hosting control panel (see below).

    – – –
    These are the settings of the new server
    WP Version: 5.5.3
    PHP memory limit 512 MB
    PHP Version: 7.4.13
    PHP Post Max Size: 8 MB
    PHP Time Limit: 0
    PHP Max Input Vars: 5000
    MySQL Version: 5.5.5
    Max Upload Size: 2 MB

    – – –

    But sadly that did not solve our error problem.

    We would like tot deactivate the W3TC plugin.
    But simply turning it off in WordPress doesn,t work because our website dissapears.

    What steps should we take to manually deactivate the W3TC plugin?

    Best regards,
    Nils Hilbers

    #32087
    Jesse Owens
    Keymaster

    Hi Nils-

    I’m sorry to hear that the issues came back even after moving the site. Is the error still the same as before, that the memory limit was exceeded? Disabling W3TC shouldn’t be a memory-intensive task, so I’d still recommend checking out the rest of the site to see what’s taking up so much memory.

    That being said, here’s what you should do to disable the plugin manually.

    First, I highly recommend placing your CloudFlare into Development Mode so that you can be sure any errors you might see are not related to the CDN.

    Once you have CloudFlare in Development mode, follow this procedure:
    1. Purge all caches
    2. Deactivate and Delete Plugin
    3. Check .htaccess File (make a backup)
    W3TC will create many directives in .htaccess file to control the caching behavior. Each section will start and end with comments like “#BEGIN W3TC Page Cache core” and “#END W3TC Page Cache core”.
    Ensure that no residual entries are left over in your .htaccess file after deleting the plugin.
    4. Delete the following files and folders inside wp-content:
    – cache folder
    – w3tc-config folder
    – object-cache.php (if exists)
    – advanced-cache.php (if exists)
    – dbcache.php (if exists)
    – upgrade folder
    – delete w3-total-cache folder in wp-content/plugins/ (if exists)
    5. Delete Cached Files from CDN
    Besides deleting all the relevant files, if you use CDN then ensure to purge the cached content from your CDN. This is necessary when you enabled minify option in W3TC settings. You should delete the minified and combined scripts and CSS files from your CDN server to avoid the site breaking on the browser.

    #32149
    Nils Hilbers
    Guest

    Hi Jesse,

    I tried the steps that you send me.
    But that did not work.
    The website was broken again and I had te use a backup to get the website back.

    If I gave you access to WordPress, could you de-install the W3TC plugin for us?

    Best regards,
    Nils

    #32163
    Jesse Owens
    Keymaster

    Hi Nils-

    Our premium support team can help out in that manner, if you’d like to reach out to them you can do so directly from your WordPress Dashboard in the Performance > Support menu.

    Are you able to check your server’s Apache or NGINX error logs when the site “broke” so that we can see what exactly went wrong? Your web host may also be able to assist by providing the error logs.

    #32293
    Nils Hilbers
    Guest

    Hi Jesse,

    Yes, we would love some help from the support team.
    on the 12th of november 2020 we bought the PRO version of the plugin
    Annual Subscription code: BNYPqPwDnJaXH1kxxNOqq3yFLDqm11JL
    That should give us access to the premium support team, right?

    But
    When I go to Performance > Support in WordPress, I only get a W3TC-Logo and nothing else.
    Is there another way of getting in touch with the support team?

    Thanks,
    Nils

    #32302
    Jesse Owens
    Keymaster

    Hi Nils-

    Yes, by all means definitely get in touch with our Pro Support Team since you have purchased. That’s definitely odd that you’re not able to load the Support area of the plugin, so you can use this contact form instead.

Viewing 17 posts - 1 through 17 (of 17 total)
  • The topic ‘We can’t deactivate without killing the Yaviva.nl site’ is closed to new replies.