SG Optimizer free WordPress plugin

Description

Plugin profile Category: Uncategorized
Plugin profile Tags: caching memcache memcached nginx speed

SG Optimizer free WordPress plugin

This plugin is designed to link WordPress with the SiteGround Performance services. It WILL NOT WORK on another hosting provider. The SG Optimizer plugin has few different parts handling speciffic performance optimizations: Configuration For detailed information on our plugin and how it works, please check out our SG Optimizer Tutorial. SuperCacher Settings In this tab, you can configure your Dynamic Caching to store your content in the server’s memory for faster access and Memcached which stores frequently executed queries to your database and reuses them for better performance. Make sure you’ve enabled them from your Site Tools or cPanel before using the plugin. You can also enable Automatic Cache purge. This will perform a Full Purge on page, posts, and category deletion, plugin and theme activation, deactivation, or update, and on WordPress core updates. Enabling the Browser-specific caching will create different cache versions based on the user agent used. From Exclude Post Types you can exclude the ones you don’t want to be cached at all. You can also exclude specific URLs or use a wildcard to exclude any sub-pages of a specific “parent-page”. We have also provided a test tool where you can check if a specific URL has Dynamic caching actually running. Environment Optimization Here, you can force HTTPS for your site, enable or disable Gzip Compression and Browser Caching rules. You can activate Database Optimization which will remove all unnecessary items from your database and optimize its tables. If you are using the InnoDB storage engine, the optimization of tables is done automatically by the engine. Use DNS-Prefetching to increase load speeds for external resources. It works by resolving the domain name, before a resource is requested. You can also manage Heartbeat Control to modify the frequency of the WP Heartbeat for different locations. By default, the WordPress Heartbeat API checks every 15 seconds on your post edit pages and every 60 seconds on your dashboard and front end whether there are scheduled tasks to be executed. With this option, you can make the checks run less frequently or completely disable them. Frontend Optimization In this tab, you can enable or disable Minification of your HTML, JS and CSS resources. You can activate/deactivate JS and CSS combinations to reduce the numbers of requests to the server. With the Web Fonts Optimization we’re changing the default way we load Google fonts. A preconnect link for Google’s font repository will be added in your head tag. This informs the browser that your page intends to establish a connection to another origin, and that you’d like the process to start as soon as possible. In addition, all other local fonts will be preloaded so browsers can cache and render them faster. Also when combined with CSS Combination, we will change the font-display property to swap or add it if it’s missing, so we ensure faster rendering. You can Disable Emojis support in your pages to prevent WordPress from detecting and generating emojis on your pages. You can also Remove Query Strings from static resources to improve their caching. Image Optimization Here, you can enable or disable automatic optimization for your newly uploaded images or bulk optimize your old ones. You can enable the generation of WebP images for newly uploaded images or generate WebP copies of your existing ones. WebP is a next generation image format supported by modern browsers which greatly reduces the size of your images. If the browser does not support WebP, the original images will be loaded. If you wish, you can delete all WebP copies of your images and original images will be loaded by default. You can also enable or disable Lazy Load for various assets such as iframes, videos, thumbnails, widgets, shortcodes and more. You can also enable Lazy Load for mobile requests. You have an option to exclude specific images from Lazy Loading. This is done by adding the class of the image in the tab. Speed Test Our performance check is powered by Google PageSpeed. Here you can check how well your website is optimized. The detailed tests result will provide you with additional information on what can be optimized more. Full-page Caching on CloudFlare Тhis optimization links your WordPress site with Cloudflare and sets the necessary rules and workers in order to enable full-page caching on Cloudflare edges in order to improve your TTFB and overall site performance. The tab will be available only if you have properly configured your installation to work with the CDN. Plugin Compatibility If your plugin does not trigger standard WordPress hooks or you need us to purge the cache, you can use this public function in your code: if (function_exists(‘sg_cachepress_purge_cache’)) { sg_cachepress_purge_cache(); } Preferrably, you can pass an URL to the function to clear the cache just for it instead of purging the entire cache. For example: if (function_exists(‘sg_cachepress_purge_cache’)) { sg_cachepress_purge_cache(‘https://yoursite.com/pluginpage’); } You can exclude styles from being combined and minified using the filters we’ve designed for that purpose. Here’s an example of the code, you can add to your functions.php file: add_filter( ‘sgo_css_combine_exclude’, ‘css_combine_exclude’ ); function css_combine_exclude( $exclude_list ) { // Add the style handle to exclude list. $exclude_list[] = ‘style-handle’; $exclude_list[] = ‘style-handle-2’; return $exclude_list; } add_filter( ‘sgo_css_minify_exclude’, ‘css_minify_exclude’ ); function css_minify_exclude( $exclude_list ) { // Add the style handle to exclude list. $exclude_list[] = ‘style-handle’; $exclude_list[] = ‘style-handle-2’; return $exclude_list; } You can exclude script from being minified using the filter we’ve designed for that purpose. Here’s an example of the code, you can add to your functions.php file: add_filter( ‘sgo_js_minify_exclude’, ‘js_minify_exclude’ ); function js_minify_exclude( $exclude_list ) { $exclude_list[] = ‘script-handle’; $exclude_list[] = ‘script-handle-2’; return $exclude_list; } You can exclude script from being combined using the filter we’ve designed for that purpose. Here’s an example of the code, you can add to your functions.php file: add_filter( ‘sgo_javascript_combine_exclude’, ‘js_combine_exclude’ ); function js_combine_exclude( $exclude_list ) { $exclude_list[] = ‘script-handle’; $exclude_list[] = ‘script-handle-2’; return $exclude_list; } You can exclude external script from being combined using the filter we’ve designed for that purpose. Here’s an example of the code, you can add to your functions.php file: add_filter( ‘sgo_javascript_combine_excluded_external_paths’, ‘js_combine_exclude_external_script’ ); function js_combine_exclude_external_script( $exclude_list ) { $exclude_list[] = ‘script-host.com’; $exclude_list[] = ‘script-host-2.com’; return $exclude_list; } You can exclude inline script from being combined using the filter we’ve designed for that purpose. Here’s an example of the code, you can add to your functions.php file: add_filter( ‘sgo_javascript_combine_excluded_inline_content’, ‘js_combine_exclude_inline_script’ ); function js_combine_exclude_inline_script( $exclude_list ) { $exclude_list[] = ‘first few symbols of inline content script’; return $exclude_list; } You can exclude script from being loaded asynchronous using the filter we’ve designed for that purpose. Here’s an example of the code, you can add to your functions.php file: add_filter( ‘sgo_js_async_exclude’, ‘js_async_exclude’ ); function js_async_exclude( $exclude_list ) { $exclude_list[] = ‘script-handle’; $exclude_list[] = ‘script-handle-2’; return $exclude_list; } You can exclude url or url that contain specific query param using the following filters: add_filter( ‘sgo_html_minify_exclude_params’, ‘html_minify_exclude_params’ ); function html_minify_exclude_params( $exclude_params ) { // Add the query params that you want to exclude. $exclude_params[] = ‘test’; return $exclude_params; } add_filter( ‘sgo_html_minify_exclude_urls’, ‘html_minify_exclude’ ); function html_minify_exclude( $exclude_urls ) { // Add the url that you want to exclude. $exclude_urls[] = ‘http://mydomain.com/page-slug’; return $exclude_urls; } You can exclude images from Lazy Load using the following filter: add_filter( ‘sgo_lazy_load_exclude_classes’, ‘exclude_images_with_specific_class’ ); function exclude_images_with_specific_class( $classes ) { // Add the class name that you want to exclude from lazy load. $classes[] = ‘test-class’; return $classes; } WP-CLI Support In version 5.0 we’ve added full WP-CLI support for all plugin options and functionalities. wp sg purge (url) – purges the entire cache or if URL is passed wp sg memcached enable|disable – enables or disables Memcached wp sg forcehttps enable|disable – enables or disables HTTPS for your site wp sg optimize – enables or disables different optimization options for your site: wp sg optimize html enable|disable – enables or disables HTML minification wp sg optimize js enable|disable – enables or disables JS minification wp sg optimize css enable|disable – enables or disables CSS minification wp sg optimize combine-css enable|disable – enables or disables CSS combination wp sg optimize combine-js enable|disable – enables or disables JS combination wp sg optimize querystring enable|disable – enables or disables query strings removal wp sg optimize emojis enable|disable – enables or disables stripping of the Emoji scripts wp sg optimize images enable|disable – enables or disables New image optimization wp sg optimize webp enable|disable – enables or disables WebP image optimization wp sg optimize lazyload enable|disable – enables or disables Lazy loading of images wp sg optimize gzip enable|disable – enables or disables Gzip compression for your site wp sg optimize browsercache enable|disable – enables or disables Browser caching rules wp sg optimize dynamic-cache enable|disable – enables or disables Dynamic caching rules wp sg optimize web-fonts enable|disable – enables or disables Web Fonts Optimization wp sg optimize fix_insecure_content enable|disable – enables or disables Insecure Content Fix wp sg status dynamic-cache|autoflush-cache|mobile-cache|html|js|js-async|css|combine-css|querystring|emojis|images|lazyload_images|lazyload_gravatars|lazyload_thumbnails|lazyload_responsive|lazyload_textwidgets|gzip|browser-caching|memcache|ssl|ssl-fix|web-fonts|combine-js|webp – returns optimization current status (enabled|disabled) Requirements In order to work correctly, this plugin requires that your server meets the following criteria: SiteGround account WordPress 4.7 PHP 5.5 If you’re not hosted with SiteGround this plugin WILL NOT WORK because it relies on a specific server configuration Our plugin uses a cookie in order to function properly. It does not store personal data and is used solely for the needs of our caching system.

WPMarket

Photo by Karolina Grabowska from Pexels: https://www.pexels.com/photo/a-red-sale-tag-on-a-miniature-shopping-cart-placed-on-a-macbook-laptop-5632381/

Post your Add here!

Interested to post
your products?

Ask us for Marketing
and Advertising options.

We would love to help you!

Sites Using

SG Optimizer free WordPress plugin