Venkat Raj
Forum Replies Created
-
@janardhanjp At this moment there is no option to remove that single line. To implement this, could you please let us know which
robots.txt
analyzer throws error? Thanks@jaredatcanvas Please provide more information to understand the issue.
1. Have you purged the62 GB
wpo-minify files and folders?
2. Does only WP-Optimize pages are blank or all plugin pages?
3. Provide your php error log details
Considering the timeout and 524 errors you are getting this seems to be a server issue@janardhanjp It is not possible to remove single line. You can remove all the lines added by WP-Optimize by adding following code in your theme’s
functions.php
fileadd_action('after_setup_theme', 'ab123_remove_robots_txt_entry'); function ab123_remove_robots_txt_entry() { if (function_exists('WP_Optimize')) { remove_filter('robots_txt', array(WP_Optimize(), 'robots_txt'), 99, 1); } }
- This reply was modified 1 year, 3 months ago by Venkat Raj.
- This reply was modified 1 year, 3 months ago by Venkat Raj.
Hello Alexander,
Here is logged in version of the same steps.
https://drive.google.com/file/d/1mKcxfLJQnDZrKC8P5NEjasd_vtLgIr3X/view?usp=drive_linkIt is also from Apache 2.4 as you can see in screencast.
Minify only overwrite the value on static assets, doesn’t send separate headers
https://plugins.trac.www.ads-software.com/browser/wp-optimize/tags/3.2.16/minify/class-wp-optimize-minify-front-end.php#L2115
Since this seems to be a specific environment issue, I’m afraid I couldn’t help much.
I agree with one thing that If an URL is excluded then browser cache shouldn’t send caching headers for that page. I’ve added this to our to do list.Hi @forcesail
I followed the same steps you’ve demonstrated in your video and I couldn’t able to reproduce the issue. Please watch the video and let me know where I went wrong.
https://drive.google.com/file/d/1aVvGK1ovDPvN9eUd1ueROrYr_j0HdAZv/view?usp=drive_link
In my testing, there is nocache-control
header by default in WordPress. As per the apache documentation
https://httpd.apache.org/docs/2.4/mod/mod_headers.html#headerOnly using
add
causes 2 or more headers with the same name. Whereas WP-O usesset
in its.htaccess
rules.
If this is browser specific or server specific (i.e. specific version of module header, rewrite) then I’m afraid I couldn’t do much to help you.
You could disable browser caching in WP-Optimize and setup your own rules in your server to solve the issue?@forcesail I was unable to reproduce the two
cache-control
headers issue. Here is what I done.
When a user is logged in, the header cache-control: no-cache, must-revalidate, max-age=0 comes from WP core
When WP-O is active and cache is off, but the browser cache is enabled,Dashboard => WP-Optimize => Cache => Static file headers
it adds cache-control: private, must-revalidate from.htaccess
file which you can avoid by disabling browser caching.
But still I can’t reproduce the double header issue. I tested in Chrome Version 114.0.5735.90 (Official Build) (64-bit) on Linux desktop@webprom By same server, do you mean same hosting or actually same server with same Apache and PHP configurations?
@rawan2021 Are you using any additional plugins for WooCommerce product variations?
@newbie63 Both plugins provide page caching feature. So, if you enable both plugins it will provide
unexpected results
In addition to page caching, WP-Optimize also offer database optimization, image optimization and other feature. Choose whatever works best for you.@webprom You’ll see a
uploads/wpo
folder and some files in it. If your server restricts access (for security reasons) to those files, then the self test will fail and WP-Optimize empties the.htaccess
file. i.e. If redirection test is failed, then there is no use to have.htaccess
rules in place. So, it was emptied.
That said, we are working on alternative way to find the possibilities of serving webp images instead of relying on accessuploads
folder.@l575 First delete the existing
robots.txt
file and try again.By defult, WP-Optimize doesn’t create a
robots.txt
file. When an SEO plugin (or other plugins) create arobots.txt
file, the provided code will prevent WP-Optimize from adding those line torobots.txt
file@aaron843 You can’t supply a numeric value to
add_filter
call. It should beadd_filter('wpo_page_cache_preload_continue_interval', function($interval) { return 1200; }); add_filter('wpo_page_cache_preload_memory_threshold', function($threshold) { $new_threshold = 1234; // you desired number return $new_threshold; });
@webprom Presence of
wp-optimize-lossy_compression
option is based onCompression options
you have selected and doesn’t have any relationship with WebP serving.In
WebP conversion
section you can clickShow advanced options
section andReset WebP serving method
However, if the self test for htaccess capability fails, you will still seewp-optimize-rewrite_status false
The result depends on many things such as enabled modules. If you have restricted access touploads
folder, it may also effect the test result.@marberz Glad to hear that. Thanks for letting us know
@fkoomek I was able to reproduce the issue, and added to our to do list. The fix will be available in the future release