{"id":5842,"date":"2020-06-07T13:47:07","date_gmt":"2020-06-07T10:47:07","guid":{"rendered":"https:\/\/lotussoft.ua\/old\/?p=5842"},"modified":"2020-11-23T14:09:54","modified_gmt":"2020-11-23T11:09:54","slug":"how-to-speed-up-a-wordpress-website-and-online-store-on-woocommerce","status":"publish","type":"post","link":"https:\/\/lotussoft.ua\/old\/en\/how-to-speed-up-a-wordpress-website-and-online-store-on-woocommerce\/","title":{"rendered":"How to Speed Up a WordPress Website and Online Store on WooCommerce"},"content":{"rendered":"<div class=\"blog_page\">\n<p align=\"justify\">The article contains my practices that I use to speed up the work of the site on the WordPress platform or online store on WordPress + Woocommerce.<br \/>\nI want to warn you right away &#8212; this is not Google Page Speed.<\/p>\n<div class=\"table_of_contents\">\n<p>Contents:<\/p>\n<ul>\n<li><a href=\"#y1\">Hosting for WordPress<\/a><\/li>\n<li><a href=\"#y2\">PHP settings<\/a><\/li>\n<li><a href=\"#y3\">MySQL settings<\/a><\/li>\n<li><a href=\"#y4\">Theme for WordPress + Woocommerce<\/a><\/li>\n<li><a href=\"#y5\">Plugins to speed up the site<\/a><\/li>\n<li><a href=\"#y6\">PHP code to speed up the site<\/a><\/li>\n<\/ul>\n<\/div>\n<p><a name=\"y1\"><\/a><\/p>\n<h2>Hosting for WordPress.<\/h2>\n<p>A lot of articles and recommendations have been written on this subject, so there is no sense to repeat it. Here are my practical tips briefly:<\/p>\n<h3>Virtual hosting is suitable for:<\/h3>\n<ul>\n<li>small site \/ blog \/ etc with low traffic<\/li>\n<li>small online store + low traffic blog<\/li>\n<\/ul>\n<h3>VPS is suitable for:<\/h3>\n<ul>\n<li>corporate website \/ blog with average traffic<\/li>\n<li>online store with up to 2000 items and average traffic<\/li>\n<\/ul>\n<p>VPS settings &#8212; at least two processors and 4 gB of memory.<\/p>\n<h3>Dedicated server:<\/h3>\n<p align=\"justify\">Here, fantasy is limited only by common sense, and the server should start with at least four processors and 8 gB of memory.<\/p>\n<p>As a hosting provider, I recommend \u201c<a href=\"https:\/\/billing.hostpro.ua\/aff.php?aff=6133\">HOSTPRO<\/a>\u201d, which I have been working with for more than ten years..<\/p>\n<h2>Hosting options.<\/h2>\n<p align=\"justify\">Properly configured hosting is the half the speed of the site. I use the following settings:<\/p>\n<p><a name=\"y2\"><\/a><\/p>\n<h3>PHP settings<\/h3>\n<ul>\n<li>PHP version from 7.2 or higher<\/li>\n<li>Process memory (memory_limit) &#8212; 512<\/li>\n<li>Script execution time (max_execution_time) 300 Zend OPCache Module<\/li>\n<\/ul>\n<p>Zend OPCache Module<\/p>\n<ul>\n<li>opcache.enable=1<\/li>\n<li>opcache.validate_timestamps=1<\/li>\n<li>opcache.revalidate_freq=60<\/li>\n<li>opcache.max_accelerated_files=10000<\/li>\n<li>opcache.memory_consumption=64<\/li>\n<li>opcache.interned_strings_buffer=8<\/li>\n<li>opcache.fast_shutdown=1<\/li>\n<\/ul>\n<p>Memcached module<br \/>\nIgbinary module<\/p>\n<ul>\n<li>igbinary.compact_strings<\/li>\n<\/ul>\n<p><a name=\"y3\"><\/a><\/p>\n<h3>MySQL settings<\/h3>\n<p>There is a good article about configuration settings for MySql \u201cServer Configuration Examples\u201d<a href=\"https:\/\/ruhighload.com\/mycnfexample\">https:\/\/ruhighload.com\/mycnfexample<\/a><\/p>\n<p>This is where I\u2019d like to finish the setup of the server side, although there is still a lot of work for the system administrator.<\/p>\n<h2>Setting up the site<\/h2>\n<p><a name=\"y4\"><\/a><\/p>\n<h3>Theme for WordPress + Woocommerce<\/h3>\n<p align=\"justify\">If a good hosting is 50% of success, then a well-optimized topic is the next 25% and the remaining 25% are plugins. There are many separate articles on choosing a topic, I recommend <a href=\"https:\/\/www.commercegurus.com\/product\/shoptimizer\/\">SHoptimizer<\/a><\/p>\n<p><a name=\"y5\"><\/a><\/p>\n<h3>Plugins to speed up the site<\/h3>\n<ul>\n<li>Pomodoro module for translation (transaction) caching<br \/>\n<a href=\"https:\/\/github.com\/pressjitsu\/pomodoro\">https:\/\/github.com\/pressjitsu\/pomodoro<\/a><\/li>\n<li>LiteSpeed Cache Plugin &#8212; I tried a lot of, stopped on it<br \/>\n<a href=\"https:\/\/wordpress.org\/plugins\/litespeed-cache\/\">https:\/\/wordpress.org\/plugins\/litespeed-cache\/<\/a><\/li>\n<li>Premmerce WooCommerce Performance Optimizer Features<br \/>\n<a href=\"https:\/\/premmerce.com\/woocommerce-performance-optimizer\/\">https:\/\/premmerce.com\/woocommerce-performance-optimizer\/<\/a><\/li>\n<li>Clearfy \u2013 WordPress optimization plugin and disable ultimate tweaker<br \/>\n<a href=\"https:\/\/wordpress.org\/plugins\/clearfy\/\">https:\/\/wordpress.org\/plugins\/clearfy\/<\/a><\/li>\n<\/ul>\n<p><a name=\"y6\"><\/a><\/p>\n<h2>PHP code to speed up the site<\/h2>\n<p align=\"justify\">Here will be the insertions of php code, which must be added to the function.php of the child theme. \uf0e8\tI hope everyone knows what a child theme is.<\/p>\n<h3>How to speed up an admin panel:<\/h3>\n<p>First part:<\/p>\n<p align=\"justify\">* Disable the forced verification of new versions of WP, plugins and themes in the admin panel so that it does not slow down when you haven\u2019t entered for a long time&#8230;<br \/>\n* All checks will occur unnoticed through the cron or when entering the page: \u201cConsole > Updates\u201d.<\/p>\n<pre>if( is_admin() ){\r\n\/\/ disable update check\r\nremove_action( 'admin_init', '_maybe_update_core' );\r\nremove_action( 'admin_init', '_maybe_update_plugins' );\r\nremove_action( 'admin_init', '_maybe_update_themes' );\r\nremove_action( 'load-plugins.php', 'wp_update_plugins' );\r\nremove_action( 'load-themes.php', 'wp_update_themes' );\r\n\r\nadd_filter( 'pre_site_transient_browser_'. md5( $_SERVER['HTTP_USER_AGENT'] ), '__return_true' );\r\n}\r\n<\/pre>\n<p>The second part &#8212; it should be used very carefully, it disables styles and js scripts on those pages where there is no woocommerce<\/p>\n<pre>add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 );\r\nfunction child_manage_woocommerce_styles() {\r\n\/\/remove generator meta tag\r\nremove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );\r\n\/\/first check that woo exists to prevent fatal errors\r\nif ( function_exists( 'is_woocommerce' ) ) {\r\n\/\/dequeue scripts and styles\r\nif ( ! is_woocommerce() &amp;&amp; ! is_cart() &amp;&amp; ! is_checkout() ) {\r\nwp_dequeue_style( 'woocommerce_frontend_styles' );\r\nwp_dequeue_style( 'woocommerce_fancybox_styles' );\r\nwp_dequeue_style( 'woocommerce_chosen_styles' );\r\nwp_dequeue_style( 'woocommerce_prettyPhoto_css' );\r\nwp_dequeue_script( 'wc_price_slider' );\r\nwp_dequeue_script( 'wc-single-product' );\r\nwp_dequeue_script( 'wc-add-to-cart' );\r\nwp_dequeue_script( 'wc-cart-fragments' );\r\nwp_dequeue_script( 'wc-checkout' );\r\nwp_dequeue_script( 'wc-add-to-cart-variation' );\r\nwp_dequeue_script( 'wc-single-product' );\r\nwp_dequeue_script( 'wc-cart' );\r\nwp_dequeue_script( 'wc-chosen' );\r\nwp_dequeue_script( 'woocommerce' );\r\nwp_dequeue_script( 'prettyPhoto' );\r\nwp_dequeue_script( 'prettyPhoto-init' );\r\nwp_dequeue_script( 'jquery-blockui' );\r\nwp_dequeue_script( 'jquery-placeholder' );\r\nwp_dequeue_script( 'fancybox' );\r\nwp_dequeue_script( 'jqueryui' );\r\n}\r\n}\r\n}\r\n<\/pre>\n<h3>Removing WP-Syntax<\/h3>\n<pre>remove_action( 'wp_head','wp_syntax_head');\r\n<\/pre>\n<h3>Invoking Contact Form 7 (if you have one) only on the pages, where it is used<\/h3>\n<pre>\/\/ Deregister Contact Form 7 styles\r\n\r\nadd_action( 'wp_print_styles', 'aa_deregister_styles', 100 );\r\nfunction aa_deregister_styles() {\r\nif ( ! is_page( get_theme_mod( \"header_contacts\") ) ) {\r\nwp_deregister_style( 'contact-form-7' );\r\n}\r\n}\r\n\r\n\/\/ Deregister Contact Form 7 JavaScript files on all pages without a form\r\nadd_action( 'wp_print_scripts', 'aa_deregister_javascript', 100 );\r\nfunction aa_deregister_javascript() {\r\nif ( ! is_page( get_theme_mod( \"header_contacts\") ) ) {\r\nwp_deregister_script( 'contact-form-7' );\r\n}\r\n}\r\n<\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The article contains my practices that I use to speed up the work of the site&#8230;<\/p>\n","protected":false},"author":1,"featured_media":4710,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[664],"tags":[],"class_list":["post-5842","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-useful-tips"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Speed Up a WordPress Website and Online Store on WooCommerce - \u0422\u041c LotussSoft. \u0423\u043a\u0440\u0430\u0438\u043d\u0430<\/title>\n<meta name=\"description\" content=\"My practices for speeding up websites on Wordpress and an online store on Woocommerce.\u0422\u041c LotussSoft. \u0423\u043a\u0440\u0430\u0438\u043d\u0430\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/lotussoft.ua\/old\/en\/how-to-speed-up-a-wordpress-website-and-online-store-on-woocommerce\/\" \/>\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Speed Up a WordPress Website and Online Store on WooCommerce - \u0422\u041c LotussSoft. \u0423\u043a\u0440\u0430\u0438\u043d\u0430\" \/>\n<meta property=\"og:description\" content=\"My practices for speeding up websites on Wordpress and an online store on Woocommerce.\u0422\u041c LotussSoft. \u0423\u043a\u0440\u0430\u0438\u043d\u0430\" \/>\n<meta property=\"og:url\" content=\"https:\/\/lotussoft.ua\/old\/en\/how-to-speed-up-a-wordpress-website-and-online-store-on-woocommerce\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0422\u041c LotussSoft. \u0423\u043a\u0440\u0430\u0438\u043d\u0430\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-07T10:47:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-11-23T11:09:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/lotussoft.ua\/old\/wp-content\/uploads\/2016\/02\/contacts.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1200\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"lsadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c\" \/>\n\t<meta name=\"twitter:data1\" content=\"lsadmin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u043c\u0438\u043d\u0443\u0442\u044b\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Speed Up a WordPress Website and Online Store on WooCommerce - \u0422\u041c LotussSoft. \u0423\u043a\u0440\u0430\u0438\u043d\u0430","description":"My practices for speeding up websites on Wordpress and an online store on Woocommerce.\u0422\u041c LotussSoft. \u0423\u043a\u0440\u0430\u0438\u043d\u0430","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/lotussoft.ua\/old\/en\/how-to-speed-up-a-wordpress-website-and-online-store-on-woocommerce\/","og_locale":"ru_RU","og_type":"article","og_title":"How to Speed Up a WordPress Website and Online Store on WooCommerce - \u0422\u041c LotussSoft. \u0423\u043a\u0440\u0430\u0438\u043d\u0430","og_description":"My practices for speeding up websites on Wordpress and an online store on Woocommerce.\u0422\u041c LotussSoft. \u0423\u043a\u0440\u0430\u0438\u043d\u0430","og_url":"https:\/\/lotussoft.ua\/old\/en\/how-to-speed-up-a-wordpress-website-and-online-store-on-woocommerce\/","og_site_name":"\u0422\u041c LotussSoft. \u0423\u043a\u0440\u0430\u0438\u043d\u0430","article_published_time":"2020-06-07T10:47:07+00:00","article_modified_time":"2020-11-23T11:09:54+00:00","og_image":[{"width":1920,"height":1200,"url":"https:\/\/lotussoft.ua\/old\/wp-content\/uploads\/2016\/02\/contacts.jpg","type":"image\/jpeg"}],"author":"lsadmin","twitter_card":"summary_large_image","twitter_misc":{"\u041d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c":"lsadmin","\u041f\u0440\u0438\u043c\u0435\u0440\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f":"4 \u043c\u0438\u043d\u0443\u0442\u044b"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/lotussoft.ua\/old\/en\/how-to-speed-up-a-wordpress-website-and-online-store-on-woocommerce\/#article","isPartOf":{"@id":"https:\/\/lotussoft.ua\/old\/en\/how-to-speed-up-a-wordpress-website-and-online-store-on-woocommerce\/"},"author":{"name":"lsadmin","@id":"https:\/\/lotussoft.ua\/old\/#\/schema\/person\/4c19b23b9fe0acc50bc0bb422d94a62e"},"headline":"How to Speed Up a WordPress Website and Online Store on WooCommerce","datePublished":"2020-06-07T10:47:07+00:00","dateModified":"2020-11-23T11:09:54+00:00","mainEntityOfPage":{"@id":"https:\/\/lotussoft.ua\/old\/en\/how-to-speed-up-a-wordpress-website-and-online-store-on-woocommerce\/"},"wordCount":540,"commentCount":0,"image":{"@id":"https:\/\/lotussoft.ua\/old\/en\/how-to-speed-up-a-wordpress-website-and-online-store-on-woocommerce\/#primaryimage"},"thumbnailUrl":"https:\/\/lotussoft.ua\/old\/wp-content\/uploads\/2016\/02\/contacts.jpg","articleSection":["Useful Tips"],"inLanguage":"ru-RU","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/lotussoft.ua\/old\/en\/how-to-speed-up-a-wordpress-website-and-online-store-on-woocommerce\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/lotussoft.ua\/old\/en\/how-to-speed-up-a-wordpress-website-and-online-store-on-woocommerce\/","url":"https:\/\/lotussoft.ua\/old\/en\/how-to-speed-up-a-wordpress-website-and-online-store-on-woocommerce\/","name":"How to Speed Up a WordPress Website and Online Store on WooCommerce - \u0422\u041c LotussSoft. \u0423\u043a\u0440\u0430\u0438\u043d\u0430","isPartOf":{"@id":"https:\/\/lotussoft.ua\/old\/#website"},"primaryImageOfPage":{"@id":"https:\/\/lotussoft.ua\/old\/en\/how-to-speed-up-a-wordpress-website-and-online-store-on-woocommerce\/#primaryimage"},"image":{"@id":"https:\/\/lotussoft.ua\/old\/en\/how-to-speed-up-a-wordpress-website-and-online-store-on-woocommerce\/#primaryimage"},"thumbnailUrl":"https:\/\/lotussoft.ua\/old\/wp-content\/uploads\/2016\/02\/contacts.jpg","datePublished":"2020-06-07T10:47:07+00:00","dateModified":"2020-11-23T11:09:54+00:00","author":{"@id":"https:\/\/lotussoft.ua\/old\/#\/schema\/person\/4c19b23b9fe0acc50bc0bb422d94a62e"},"description":"My practices for speeding up websites on Wordpress and an online store on Woocommerce.\u0422\u041c LotussSoft. \u0423\u043a\u0440\u0430\u0438\u043d\u0430","breadcrumb":{"@id":"https:\/\/lotussoft.ua\/old\/en\/how-to-speed-up-a-wordpress-website-and-online-store-on-woocommerce\/#breadcrumb"},"inLanguage":"ru-RU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/lotussoft.ua\/old\/en\/how-to-speed-up-a-wordpress-website-and-online-store-on-woocommerce\/"]}]},{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/lotussoft.ua\/old\/en\/how-to-speed-up-a-wordpress-website-and-online-store-on-woocommerce\/#primaryimage","url":"https:\/\/lotussoft.ua\/old\/wp-content\/uploads\/2016\/02\/contacts.jpg","contentUrl":"https:\/\/lotussoft.ua\/old\/wp-content\/uploads\/2016\/02\/contacts.jpg","width":1920,"height":1200},{"@type":"BreadcrumbList","@id":"https:\/\/lotussoft.ua\/old\/en\/how-to-speed-up-a-wordpress-website-and-online-store-on-woocommerce\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430","item":"https:\/\/lotussoft.ua\/old\/"},{"@type":"ListItem","position":2,"name":"How to Speed Up a WordPress Website and Online Store on WooCommerce"}]},{"@type":"WebSite","@id":"https:\/\/lotussoft.ua\/old\/#website","url":"https:\/\/lotussoft.ua\/old\/","name":"\u0422\u041c LotussSoft. \u0423\u043a\u0440\u0430\u0438\u043d\u0430","description":"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0430\u0439\u0442\u043e\u0432. SEO \u0438 SMM \u043f\u0440\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435. \u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043d\u0430\u044f \u0440\u0435\u043a\u043b\u0430\u043c\u0430","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/lotussoft.ua\/old\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ru-RU"},{"@type":"Person","@id":"https:\/\/lotussoft.ua\/old\/#\/schema\/person\/4c19b23b9fe0acc50bc0bb422d94a62e","name":"lsadmin","url":"https:\/\/lotussoft.ua\/old\/author\/lsadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/lotussoft.ua\/old\/wp-json\/wp\/v2\/posts\/5842","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lotussoft.ua\/old\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lotussoft.ua\/old\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lotussoft.ua\/old\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lotussoft.ua\/old\/wp-json\/wp\/v2\/comments?post=5842"}],"version-history":[{"count":2,"href":"https:\/\/lotussoft.ua\/old\/wp-json\/wp\/v2\/posts\/5842\/revisions"}],"predecessor-version":[{"id":5927,"href":"https:\/\/lotussoft.ua\/old\/wp-json\/wp\/v2\/posts\/5842\/revisions\/5927"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lotussoft.ua\/old\/wp-json\/wp\/v2\/media\/4710"}],"wp:attachment":[{"href":"https:\/\/lotussoft.ua\/old\/wp-json\/wp\/v2\/media?parent=5842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lotussoft.ua\/old\/wp-json\/wp\/v2\/categories?post=5842"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lotussoft.ua\/old\/wp-json\/wp\/v2\/tags?post=5842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}