Support » Plugin: WP-Optimize - Clean, Compress, Cache. » Fatal error – when creating a staging copy

  • Resolved lydenyardley

    (@lydenyardley)


    After creating a staging copy of the site (Host: SiteGround), I can’t access it, and get a fatal error, that shows on screen, AND I get an automated email from the WP install about. This happens every time I create a staging copy.

    By the time you see this, SiteGround may have worked a way around it for me, but there is still the issue with the plugin, so I’ll include the relevant parts of the WP email here:

    Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.
    
    In this case, WordPress caught an error with one of your plugins, WP-Optimize - Clean, Compress, Cache.
    
    First, visit your website (https://yardley.me/) and check for any visible issues. Next, visit the page where the error was caught (https://yardley.me/wp-login.php?redirect_to=https%3A%2F%2Fyardley.me%2Fwp-admin%2F&reauth=1) and check for any visible issues.
    
    ...
    
    Error Details
    =============
    An error of type E_ERROR was caused in line 711 of the file /home/yardley5/staging/1/wp-content/plugins/wp-optimize/cache/file-based-page-cache-functions.php. Error message: Cannot redeclare wpo_cache_maybe_ignore_query_variables() (previously declared in /home/yardley5/public_html/wp-content/plugins/wp-optimize/cache/file-based-page-cache-functions.php:711)

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Marc Lacroix

    (@marcusig)

    Hi, Thank you for the report.

    I’ve added this to our todo list.

    The issue here is that the file wp-content/advanced-cache.php needs to be re-generated to match the new path where your staging site is installed.

    If you do not have access to your admin panel, you can empty wp-content/advanced-cache.php on your staging site, and it should regenerate automatically with the right path.

    I’m not sure how the staging on SiteGround works, but if you apply the changes there and it copies them to your live site, it will then copy wp-content/advanced-cache.php with a wrong path again.

    Plugin Author David Anderson

    (@davidanderson)

    This is now fixed with the release of WP-Optimize 3.0.11 – please update, and all should be well. You will also need to turn the page cache on and off to make page cacheing work, though WP-O 3.0.11 shouldn’t crash even if you don’t.

    David

    You nailed it @davidanderson and @marcusig, and in phenomenal time. I really appreciate it. Great work!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.