404 on cart and checkout page
-
Hi there,
I keep getting a 404 error on the cart and checkout page. I’ve checked that the pages are set in WC and have even deleted and recrerated the pages using the WC tool. I’m using LiteSpeed Chache and the only way to temp solve the issue is to save permalinks and purge the site cache. After that the cart and checkout appear to be working fine but it needs to be done every 2/3 hours. How can I fix this permanently?
Best regards,
Nella
-
Hi @nella1980
I keep getting a 404 error on the cart and checkout page. I’ve checked that the pages are set in WC and have even deleted and recrerated the pages using the WC tool. I’m using LiteSpeed Chache and the only way to temp solve the issue is to save permalinks and purge the site cache. After that the cart and checkout appear to be working fine but it needs to be done every 2/3 hours. How can I fix this permanently?
From what I understand, you’re experiencing a recurring 404 error on your cart and checkout pages, despite setting them up in WooCommerce and even recreating them using our tool. I see that you’re currently using LiteSpeed Cache and the issue seems to be temporarily resolved when you save permalinks and purge the site cache, but the problem recurs every 2 to 3 hours. I appreciate your patience and I’m here to help you resolve this issue permanently.
Firstly, it’s great that you’ve already tried recreating the pages and resetting the permalinks, as these are often the first steps in troubleshooting this type of issue.
Since the problem seems to be related to your caching plugin (LiteSpeed Cache), I would recommend the following steps:
- Update your plugins and themes: Make sure that all your plugins, themes, and WordPress itself are up-to-date. This includes the WooCommerce plugin and LiteSpeed Cache.
- Check LiteSpeed Cache settings: Some settings in your caching plugin might be causing the issue. Try to disable the object cache in LiteSpeed Cache or any other setting related to cart and checkout pages.
- Disable all plugins except WooCommerce: Temporarily disable all your plugins except WooCommerce and see if the problem persists. If the issue is resolved, then one of your plugins is causing the issue. You can then reactivate them one by one to identify the culprit.
- Switch to a default theme: Try switching to a default theme like Storefront to see if your theme is causing the issue. Here’s a helpful guide on how to test for conflicts: ?? How to Test for Plugin and Theme Conflicts.
- Enable Debugging: If the problem persists, turn on debugging in WordPress. This can help identify the root cause. You can enable debugging by adding these lines to your wp-config.php file:
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 );
This will create a debug.log file in your wp-content directory, logging any PHP errors or notices. For a more detailed guide on enabling debugging in WordPress, you can visit this link: ?? Debugging in WordPress
If the issue continues after trying these steps, please share more details, like the exact error messages you see when debug mode is on. This will help us identify and solve the problem more effectively.
Also, we’d find it helpful if you could share your site’s System Status report. This will give us a better understanding of your site’s setup and help us pinpoint the problem. You can find it via
WooCommerce > Status
. SelectGet system report
and thenCopy for support
.Lastly, could you share the fatal error logs (if any) under
WooCommerce > Status > Logs
.Once you’ve gathered this information, please paste it inside a Code block in your reply, or use https://pastebin.com to paste it and share the link with us.
Thanks for your patience and cooperation in this matter! We’re here to help you get this sorted.
Hi Tamrat,
Thanks for your detailed response! I’ll be sure to try out all options. Object cache is on in my hosting provider’s cache, but I havn’t turned it on in LiteSpeed. I’ll get back to you asap.
Kind regards,
Nella
Hi @nella1980
Thanks for your detailed response! I’ll be sure to try out all options. Object cache is on in my hosting provider’s cache, but I havn’t turned it on in LiteSpeed. I’ll get back to you asap.
Thank you for your quick response and your willingness to try out the suggested solutions.
It’s great to know that you’re checking the object cache settings both in your hosting provider and in LiteSpeed. Please take your time and feel free to reach out if you encounter any issues or have any questions. We’re here to assist you.
Looking forward to hearing from you soon.
Hi @bisratlearn,
So it doesn’t appear to be the LiteSpeed Cache plugin because I turned it off for a whole day and the issue persisted. It can’t be the hosting provider’s cache because I distinctly remember that I had this issue before I turned that on. I noticed in my woocommerce status report that the thankyou.php page is out of date, so I’ll be updating that today. Everything else seems in order there. I’ll also start debugging and let you know if something comes up.
Kind regards,
Nella
Hi @nella1980,
Thank you for your update. I appreciate your efforts in troubleshooting this issue and keeping us informed.
It’s good to know that you’ve ruled out LiteSpeed Cache as the cause of the problem. Also, it’s a good step to update the thankyou.php page as outdated files can sometimes cause issues.
Turning on debugging will be very helpful in identifying any underlying problems. Remember to check the debug.log file in your wp-content directory for any PHP errors or notices that might be related to this issue.
In addition to that, you might also want to check your .htaccess file. Sometimes, incorrect settings in this file can cause 404 errors. You can temporarily rename this file to something like .htaccess_old to see if it resolves the issue. If it does, you can regenerate a new .htaccess file by going to Settings > Permalinks and simply clicking ‘Save Changes‘.
If the issue persists, please do share the debug log and your WooCommerce System Status report. You can paste it inside a Code block in your reply, or use https://pastebin.com to paste it and share the link with us. This will give us a better understanding of your site’s setup and help us pinpoint the problem.
Again, thank you for your patience and cooperation. We’re here to help you get this sorted.
- The topic ‘404 on cart and checkout page’ is closed to new replies.