{"id":85194,"date":"2018-10-04T08:27:42","date_gmt":"2018-10-04T12:27:42","guid":{"rendered":"https:\/\/www.templatemonster.com\/help\/?p=85194"},"modified":"2018-10-04T08:27:42","modified_gmt":"2018-10-04T12:27:42","slug":"how-to-minify-cssjavascript-files-in-wordpress","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/how-to-minify-cssjavascript-files-in-wordpress.html","title":{"rendered":"How to minify CSS\/JavaScript files in WordPress"},"content":{"rendered":"<p>Hello, our support team is ready to present you a new tutorial that shows how to <strong>minify CSS \/ JavaScript files<\/strong> in WordPress<\/p>\r\n<p>Minifying CSS and Javascript files makes them load faster and speeds up your WordPress site. The goal is to make your website files&#8217; size smaller by removing whitespaces, lines, and unnecessary characters from the source code. <\/p>\r\n<p>Example of the regular CSS code: <\/p>\r\n<pre class=\"brush:css\">\r\nbody {\r\n\tmargin:20px;\r\n\tpadding:20px;\r\n\tcolor:#333333;\r\n\tbackground:#f7f7f7;\r\n}\r\nh1 {\r\n\tfont-size:32px;\r\n\tcolor#222222;\r\n\tmargin-bottom:10px;\r\n}<\/pre>\r\n<p>Example of the minified CSS code: <\/p>\r\n<pre class=\"brush:css\">body{margin:20px;padding:20px;color:#333;background:#f7f7f7}h1{font-size:32px;margin-bottom:10px}\r\n<\/pre>\r\n<ol>\r\n\t<li><p>First thing you need to do is to install and activate the <a href=\"https:\/\/wordpress.org\/plugins\/bwp-minify\/\" target=\"_blank\">Better WordPress Minify<\/a> plugin.<\/p><\/li>\r\n\t<li><p>Once a plugin is activated, it will add a new <strong>BWP Minify<\/strong> menu item to your WordPress admin bar. Open it to access plugin&#8217;s settings.<\/p><\/li>\r\n\t<li><p>On the settings page, you need to check the first two options to automatically minify JavaScript and CSS files on your WordPress website.<\/p>\r\n<a class=\"darkbox\" href=\"\/help\/wp-content\/uploads\/2018\/10\/How-to-minify-CSSJavaScript-files-in-WordPress.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2018\/10\/How-to-minify-CSSJavaScript-files-in-WordPress.png\" alt=\"\" width=\"953\" height=\"635\" class=\"alignnone size-full wp-image-85210\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2018\/10\/How-to-minify-CSSJavaScript-files-in-WordPress.png 953w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2018\/10\/How-to-minify-CSSJavaScript-files-in-WordPress-150x100.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2018\/10\/How-to-minify-CSSJavaScript-files-in-WordPress-300x200.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2018\/10\/How-to-minify-CSSJavaScript-files-in-WordPress-768x512.png 768w\" sizes=\"(max-width: 953px) 100vw, 953px\" \/><\/a>\r\n<\/li>\r\n\t<li><p>You can now click on the <strong>Save Changes<\/strong> button to store your settings.<\/p><\/li>\r\n<p>By the way, you can check out the collection of our <a href=\"https:\/\/www.templatemonster.com\/wordpress-themes.php\">WordPress themes<\/a> to choose a suitable template for your online project.<\/p>\t\r\n<\/ol>","protected":false},"excerpt":{"rendered":"<p>Hello, our support team is ready to present you a new tutorial that shows how to <strong>minify CSS \/ JavaScript files<\/strong> in WordPress<\/p>\n","protected":false},"author":56,"featured_media":85195,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2017,728],"tags":[2686,2687,2688],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/85194"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/56"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=85194"}],"version-history":[{"count":6,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/85194\/revisions"}],"predecessor-version":[{"id":85228,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/85194\/revisions\/85228"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/85195"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=85194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=85194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=85194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}