Can you goto Tools > Site Health in your WordPress dashboard. To check your file permissions settings
To do this goto the Info tab
Then, scroll down to the last section, which should be labeled Filesystem Permissions
Here you’ll see a list of crucial WordPress files, including the plugin and theme directories. Ideally, they should all be listed as “Writable”, is this the case for you? If not you will need to adjust the file permissions using this guide: https://www.malcare.com/blog/wordpress-file-permissions/
Thread Starter
ms100
(@ms100)
Yes @vupdraft I have checked, they are all Writable.
Thread Starter
ms100
(@ms100)
I noticed, when I opened the page WP-Optimize > Cache, it started to Preload, exactly when I openend the page. Like it got triggered by me visiting that page in the Dashboard.
I have set the Minify > Advanced options > Lifetime old cache > 0 days.
But I don’t think this could be the cause, why the cache folders could not be created. 0 days should not cause an error in the log right?
This shouldn’t be causing the warnings your are seeing. I have asked my colleague to check on this.
@ms100 I understand that we already asked this, but make sure wp-content/cache folder is writable.
If your site traffic is low and you set cache life span to 24 hours and cache preload schedule is same as cache life span, visiting your dashboard can trigger the preload process.
Change Minify > Advanced options > Lifetime old cache > to 1 days.
What OS/Server are you using?
Thread Starter
ms100
(@ms100)
Thanks for your help @webulous
The wp-content/cache folder is writable.
wp-content/cache/wpo-cache is writable. But within that folder, there are some files that have 0644 permission. For example:
http://www.mydomain.nl > 0755
.htaccess > 0644
index.php > 0644
When I open http://www.mydomain.nl folder, there are more files with 0644:
index.html > 0644
index.html.gz > 0644
index.php > 0644
mobile.index.html > 0644
mobile.index.html.gz > 0644
We have a server cronjob that runs every 30 minutes. Preload is set to 10 hours.
I changed Minify > Advanced options > Lifetime old cache > to 1 days. (By the way, when I openend WP Optimize page(s), I noticed the cache Preloading started running again)
We have a LiteSpeed shared hosting server.
@ms100 Preloading a large site is batch process. It will process a batch of URLs in 10 minutes interval. So, if you run cronjob at every 30 minutes, you’ll likely see it is processing whenever you visit site.
Your server cronjob should run whenever the cache expires.
Regarding the error log statements, do you have enough disk space?
Thread Starter
ms100
(@ms100)
@webulous What is the best server cronjob interval for the WP-Optimize plugin? Than I will change it accordingly.
Regarding the error log statements, do you have enough disk space?
Yes, we do have enough disk space.
Today the plugin gives a new fatal error.
Maybe the plugin is looking for gzip, but maybe there is no gzip available on our LiteSpeed server (because it uses brotli compression)?
Foutdetails
Een fout van het type E_ERROR werd veroorzaakt op regelnummer 64 van het bestand /home/mydomain/public_html/wp-content/plugins/wp-optimize/includes/class-wp-optimize-gzip-compression.php. Foutmelding: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, WpOrg\Requests\Utility\CaseInsensitiveDictionary given in /home/mydomain/public_html/wp-content/plugins/wp-optimize/includes/class-wp-optimize-gzip-compression.php:64
Stack trace:
0 /home/mydomain/public_html/wp-content/plugins/wp-optimize/includes/class-wp-optimize-gzip-compression.php(120): WP_Optimize_Gzip_Compression->get_headers_information()
1 /home/mydomain/public_html/wp-content/plugins/wp-optimize/includes/class-wp-optimize-admin.php(357): WP_Optimize_Gzip_Compression->is_gzip_compression_enabled()
2 /home/mydomain/public_html/wp-includes/class-wp-hook.php(308): WP_Optimize_Admin->output_cache_gzip_tab()
3 /home/mydomain/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
4 /home/mydomain/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
5 /home/mydomain/public_html/wp-content/plugins/wp-optimize/includes/class-wp-optimize-admin.php(159): do_action()
6 /home/mydomain/public_html/wp-content/plugins/wp-optimize/includes/class-wp-optimize-admin.php(108): WP_Optimize_Admin->display_admin_page()
7 /home/mydomain/public_html/wp-includes/class-wp-hook.php(308): WP_Optimize_Admin->display_admin()
8 /home/mydomain/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
9 /home/mydomain/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
10 /home/mydomain/public_html/wp-admin/admin.php(259): do_action()
11 {main}
thrown
@ms100
> What is the best server cronjob interval for the WP-Optimize plugin?
I think my choice of words are bad in my previous reply. It doesn’t matter how frequent your server cron run, it only executes WP cron jobs as per its schedule. If You scheduled your preload the same time as your cache expires, i.e. 10 hours as per your comment, then it will run once in 10 hours, even though you scheduled server cron to run once in every 30 minutes.
So what you need to check is how large is your site and long does it take to complete preload.
2. Do your server has restrictions on number of files (even though it has space). I have seen such restrictions
3. There is a compatibility issue with WP 6.2 which is fixed. Please update to 3.2.14
Thread Starter
ms100
(@ms100)
@webulous Thanks for the clarification.
I’m pretty sure the number of files should not be the cause of this issue (public_html/wp-content/cache/wpo-minify/tmp” could not be created.) But I will do further investigation.
I can imagine most LiteSpeed server have the Litespeed Cache plugin installed. I don’t know how well the WPO plugin is tested on LiteSpeed servers. Could the Preload issue possibly have something to do with this PHP timeout?
Could it in any way be a (Brave) webbrowser related issue? I noticed the Brave Browser gives an unexpected response message when running Preload. When refreshing the page, the preloading seems to continue.
The plugin update fixed the critical error. That is great! Thanks.
Thread Starter
ms100
(@ms100)
Using the Query Monitor plugin, I found duplicate query’s. Could that have anything to do with it? Thanks again @webulous
@ms100
Since preload is a long running task, WP-Optimize attempts to close browser connection and run in the background. However some litespeed server configurations prevents the attempt to close browser connection which will result in unexpected response received However, large preloads will run in batches and as cron job. That is the reason you see continued preloading.
May be you could try the Turn off Broken Connection Aborting section in the link you have mentioned.
https://docs.litespeedtech.com/lsws/cp/cpanel/long-run-script/#turn-off-broken-connection-aborting
Thread Starter
ms100
(@ms100)
Hello @webulous
I was going to try ‘Turn off Broken Connection Aborting’, but then I found a new warning in the error_log:
[07-Apr-2023 13:31:39 UTC] PHP Warning: stat(): stat failed for /home/mydomain/public_html/wp-content/cache/wpo-minify/tmp in /home/mydomain/public_html/wp-content/plugins/wp-optimize/minify/class-wp-optimize-minify-cache-functions.php on line 21
[07-Apr-2023 13:39:52 UTC] PHP Warning: stat(): stat failed for /home/mydomain/public_html/wp-content/cache/wpo-minify/tmp in /home/mydomain/public_html/wp-content/plugins/wp-optimize/minify/class-wp-optimize-minify-cache-functions.php on line 21
[07-Apr-2023 13:39:52 UTC] PHP Warning: stat(): stat failed for /home/mydomain/public_html/wp-content/cache/wpo-minify/tmp in /home/mydomain/public_html/wp-content/plugins/wp-optimize/minify/class-wp-optimize-minify-cache-functions.php on line 32
[07-Apr-2023 13:40:10 UTC] PHP Warning: stat(): stat failed for /home/mydomain/public_html/wp-content/cache/wpo-minify/tmp in /home/mydomain/public_html/wp-content/plugins/wp-optimize/minify/class-wp-optimize-minify-cache-functions.php on line 21
[07-Apr-2023 13:40:10 UTC] PHP Warning: stat(): stat failed for /home/mydomain/public_html/wp-content/cache/wpo-minify/tmp in /home/mydomain/public_html/wp-content/plugins/wp-optimize/minify/class-wp-optimize-minify-cache-functions.php on line 32
[07-Apr-2023 16:13:31 UTC] PHP Warning: stat(): stat failed for /home/mydomain/public_html/wp-content/cache/wpo-minify/tmp in /home/mydomain/public_html/wp-content/plugins/wp-optimize/minify/class-wp-optimize-minify-cache-functions.php on line 21
[07-Apr-2023 16:13:31 UTC] PHP Warning: stat(): stat failed for /home/mydomain/public_html/wp-content/cache/wpo-minify/tmp in /home/mydomain/public_html/wp-content/plugins/wp-optimize/minify/class-wp-optimize-minify-cache-functions.php on line 32
Does this help you in understanding what is going on?
Thanks again for your support.
Thread Starter
ms100
(@ms100)
Hi @webulous
I have deactivated the Minify function in the plugin. That seems to remove the issues. For now this is ok. Thanks a lot for your support. I will mark as resolved.