• Resolved cjames53

    (@cjames53)


    Twice now my web site has been corrupted when editing WooCommerce settings. Each time, .htaccess was written incorrectly. The first time, a chunk of an <IfModule> declaration was missing, so it looked like this:

    # END Newfold Browser Cache
    odule mod_rewrite.c>
    RewriteEngine On
    [... etc.]
    </IfModule>

    Notice that the <IfModule> is chopped off at the front. This happened while I was editing the WordPress Settings –> Advanced “Page Setup” tab. I had entered a “Cart Page”, saved it, then did it a second time, this time leaving the “Cart page” blank. Boom – web site dead.

    Today, there was an extra newline inserted into what should have been a comment, so it looked like this:

    # END Newfold Browser Cache
    WordPress" and "END WordPress" are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.

    Obviously the word “WordPress” isn’t a valid .htaccess command. This happened while I was editing settings in the WooCommerce PayPal plugin (sorry, can’t give you the exact sequence).

    When .htaccess is corrupted, the nginx server won’t start at all, so not only is my web site down, but the wp-admin doesn’t work either. It’s a major bit of work to fix. I have to ssh to the web site, look through the error logs, and edit the .htaccess file by hand to get the web site back online.

    WordPress is supposed to be for non-technical users. This bug (or bugs) is serious.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @cjames53,

    Thank you for contacting WooCommerce support.

    I’ve attempted to reproduce this issue in my test environment by changing page setup settings, but it did not modify the .htaccess file. It seems likely that a different plugin is responsible for updating the .htaccess file.

    As the next step, I recommend setting up a staging site and testing again after deactivating all other plugins except WooCommerce. Additionally, it would be helpful if you could share a list of your active plugins.

    One thing to note is that Nginx does not support .htaccess files, as far as I understand. Could you confirm whether your server is running Nginx or Apache?

    Zee

    (@doublezed2)

    Hello cjames53,

    Thank you for contacting WooCommerce support.

    I agree with moon0326 about it might be some other plugin modifying the .htaccess file.

    This happened while I was editing the WordPress Settings –> Advanced “Page Setup” tab. I had entered a “Cart Page”, saved it, then did it a second time, this time leaving the “Cart page” blank. Boom – web site dead.

    The steps you have described here simply set pages for Cart, Checkout, and My Account.
    These options do not interact with the .htaccess file.

    To investigate this issue, please share your site’s System Status Report with me.
    You can paste it into https://pastebin.com and share the link here.

    This report will allow me to take a closer look at your server configuration.
    Once I have more information, I will be in a better position to assist you further.

    Best regards.

    Thread Starter cjames53

    (@cjames53)

    The steps you have described here simply set pages for Cart, Checkout, and My Account.
    These options do not interact with the .htaccess file.

    As I mentioned, the first crash happened when I clicked the WooCommerce “Save” button after reconfiguring WooCommerce. At the time, I also had the “YITH PayPal Payments for WooCommerce” enabled, and was (unsuccessfully) attempting to configure it to suit my use-case. You’ll see in the System Status Report that I now have the WooCommerce PayPal plug-in, but it wasn’t active at the time.

    Here is a link to my System Status Report on Google Drive.

    I believe the second crash is due to the FunnelKit plug-in, but can’t easily confirm it.

    moon0326 suggested:

    As the next step, I recommend setting up a staging site and testing again after deactivating all other plugins except WooCommerce. Additionally, it would be helpful if you could share a list of your active plugins.

    Thanks, but this is too much work to solve someone else’s bug. My own problems are sufficient to fill my day. If it happens again, I’ll record exactly what steps I took.

    Thanks for your help!

    • This reply was modified 1 year, 2 months ago by cjames53.
    Thread Starter cjames53

    (@cjames53)

    Here is more information regarding the second error (an errant newline in .htaccess).

    I used grep to search the whole wp-content directory, and found this:

    [~/public_html/wp-content/plugins]# grep "Newfold Browser Cache" find . -type f
    ./bluehost-wordpress-plugin/vendor/newfold-labs/wp-module-performance/includes/CacheTypes/Browser.php: const MARKER = Newfold Browser Cache';
    ./bluehost-wordpress-plugin/vendor/newfold-labs/wp-module-performance/includes/BurstSafetyMode/Browser.php: const MARKER = 'Newfold Browser Cache';

    So it looks like this is a BlueHost problem, right? Nothing to do with WooCommerce specifically. I’ll get in touch with BlueHost.

    @cjames53 Good find! Yeah, sounds like it’s related to the plugin.

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

The topic ‘.htaccess corrupted, entire web site crashes — twice’ is closed to new replies.