<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>optimization on AnyStack</title><link>https://anystack.xyz/tag/optimization/</link><description>Recent content in optimization on AnyStack</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Thu, 16 Aug 2018 15:43:46 +0000</lastBuildDate><atom:link href="https://anystack.xyz/tag/optimization/index.xml" rel="self" type="application/rss+xml"/><item><title>Optimize easily your WordPress images without any plugin</title><link>https://anystack.xyz/optimize-wordpress-images-without-plugin/</link><pubDate>Sun, 23 Oct 2016 05:52:28 +0000</pubDate><guid>https://anystack.xyz/optimize-wordpress-images-without-plugin/</guid><description>&lt;img src="https://anystack.xyz/images/2016/10/Optimize--2--min.png" alt="Featured image of post Optimize easily your WordPress images without any plugin" /&gt;&lt;p&gt;You want to improve your pagespeed score by optimizing your images in WordPress ? But you don&amp;rsquo;t want to pay a subscription for a plugin ? If you are using a VPS or a dedicated server, you don&amp;rsquo;t need any plugin to optimize all your images easily.&lt;/p&gt;&#10;&lt;p&gt;For that you can use this script :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# For debian/Ubuntu&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;wget&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;qO&lt;/span&gt; &lt;span class="n"&gt;optimize&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sh&lt;/span&gt; &lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;virtubox&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;virtubox&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;wp&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;optimize&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;master&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;deb&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;wp&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;optimize&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sh&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;bash&lt;/span&gt; &lt;span class="n"&gt;optimize&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sh&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;#For Centos/RedHat&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;cd&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;www&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;wget&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;qO&lt;/span&gt; &lt;span class="n"&gt;optimize&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sh&lt;/span&gt; &lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;virtubox&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;virtubox&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;wp&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;optimize&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;master&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;centos&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;wp&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;optimize&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sh&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;bash&lt;/span&gt; &lt;span class="n"&gt;optimize&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sh&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you want to do the process manually&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Debian/Ubuntu&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;apt-get update &amp;amp;&amp;amp; apt-get install optipng jpegoptim -y&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Centos&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;yum update &amp;amp;&amp;amp; yum install optipng jpegoptim -y&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then you just have to go in your web directory and to run the following commands :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;cd&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;www&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;find&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;*.&lt;/span&gt;&lt;span class="n"&gt;jp&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;xargs&lt;/span&gt; &lt;span class="n"&gt;jpegoptim&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;strip&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;all&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;m76&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;find&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;iname&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;*.png&amp;#39;&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;print0&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;xargs&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="n"&gt;optipng&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;o7&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;preserve&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>Making WordPress faster by running wp-cron with Linux</title><link>https://anystack.xyz/making-wordpress-faster-running-wp-cron-linux/</link><pubDate>Thu, 15 Sep 2016 05:54:00 +0000</pubDate><guid>https://anystack.xyz/making-wordpress-faster-running-wp-cron-linux/</guid><description>&lt;img src="https://anystack.xyz/images/2016/10/AnyStack---wp-cron--2--1.png" alt="Featured image of post Making WordPress faster by running wp-cron with Linux" /&gt;&lt;p&gt;WordPress use wp-cron to check updates for themes, plugins and some other process but it could have an impact on your website speed because WordPress execute it on every page-loading. So if you have a lot of traffic, it will (no benchmark proof at the moment) delay page loading for users.&lt;/p&gt;&#10;&lt;p&gt;So if you are using a linux server (VPS or dedicated), you can easily create a cron job to run it each 5 minutes or each 10 minutes. But remember WordPress need wp-cron to work properly, so don&amp;rsquo;t disable it  totally !&lt;/p&gt;&#10;&lt;p&gt;To disable wp-cron, just add the following line in wp-config.php :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;define(&amp;#39;DISABLE_WP_CRON&amp;#39;, true); &#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then to add a cronjob you have to a :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;## Run the crontab with your server or vhost user &lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;crontab&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;u&lt;/span&gt; &lt;span class="n"&gt;yourserveruser&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;## method 1 : using curl to run the script&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;*/&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;curl&lt;/span&gt; &lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;wp&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;cron&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;php&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;dev&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;null&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;## method 2 : using php to run it&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;*/&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;cd&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;www&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;htdocs&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;php&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;www&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;htdocs&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;wp&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;cron&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;php&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;dev&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;null&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;amp;&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The first method use PHP-CGI when the second use PHP-CLI, the only difference is CLI does not have time limit to run a script.&#10;Because this way, the wp-cron will not impact page loading speed, it&amp;rsquo;s highly recommended to use linux cron instead of default WordPress cron.&lt;/p&gt;&#10;&lt;p&gt;You can change */10 with */5 to run the cron each 5 minutes instead of each 10 minutes.&lt;/p&gt;&#10;</description></item><item><title>HTTP2 &amp; Web Optimization - How to have a fast website in 2016</title><link>https://anystack.xyz/http2-web-optimization-fast-website-2016/</link><pubDate>Thu, 11 Aug 2016 06:48:00 +0000</pubDate><guid>https://anystack.xyz/http2-web-optimization-fast-website-2016/</guid><description>&lt;img src="https://anystack.xyz/images/2016/10/diagram-asynchronous-resource-loading.png" alt="Featured image of post HTTP2 &amp; Web Optimization - How to have a fast website in 2016" /&gt;&lt;p&gt;Few years ago, the HTTPs protocol was slower than the http, due the the initial handshake of any SSL transaction. But with the HTTP2, there are several improvements available and some rules have change when we talk about web optimization. Most of the PageSpeed tools will recommend you to use domain sharding or to combine your assets to have a website faster. But is it still true ?&lt;/p&gt;&#10;&lt;p&gt;The most important feature of the HTTP2 is the &lt;a href="https://http2.github.io/faq/#why-is-http2-multiplexed"&gt;multiplexing&lt;/a&gt;, it allow to download multiple files with an unique TCP connection when we have to open a new one for each file in HTTP1.1&lt;/p&gt;&#10;&lt;p&gt;&lt;img loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://anystack.xyz/images/2016/10/http2-multiplexing-1.jpg"&gt;&lt;/p&gt;&#10;&lt;h2&gt;1) No more assets concatenation&lt;/h2&gt;&#10;&lt;p&gt;We used to combine as much as possible our assets with HTTP1.1, that&amp;rsquo;s not true with HTTP2 anymore. Because if it reduce the size of the requests done, it also make the rules for caching harder to define and could have  bad results if you don&amp;rsquo;t need a part of the assets on each page of your website&lt;/p&gt;&#10;&lt;p&gt;&lt;img loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://anystack.xyz/images/2016/10/http-1-1-file-concatenation.png"&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;img loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://anystack.xyz/images/2016/10/http-2-file-concatenation-1.png"&gt;&lt;/p&gt;&#10;&lt;p&gt; &lt;/p&gt;&#10;&lt;p&gt; &lt;/p&gt;&#10;&lt;h2&gt;2) No more domain sharding&lt;/h2&gt;&#10;&lt;p&gt;It was already a &amp;ldquo;trick&amp;rdquo; but the domain sharding is not a part of the past. It was used to open more TCP connection than a browser was supposed to. But you will have a negative result by using it with HTTP2 because it will only require unnecessary DNS request and more if the connection is established under TLS.&lt;/p&gt;&#10;&lt;p&gt;&lt;img loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://anystack.xyz/images/2016/10/domain-sharding-1-2.png"&gt;&lt;/p&gt;&#10;&lt;p&gt;But there are also rules which are still Best Pratices to have a fast website&lt;/p&gt;&#10;&lt;ul&gt;&#10; &lt;li&gt;Reduce DNS lookup -&amp;gt; store all assets on the same domain or with a CDN&lt;/li&gt;&#10; &lt;li&gt;Browser Caching&lt;/li&gt;&#10; &lt;li&gt;Minimize HTTP Requests -&amp;gt; cookies and query strings&lt;/li&gt;&#10; &lt;li&gt;Minimize HTTP Response -&amp;gt; Minify your assets&lt;/li&gt;&#10;&lt;/ul&gt;&#10;</description></item><item><title>New VPS for the Blog - Setup Guide</title><link>https://anystack.xyz/new-vps-blog-setup-guide/</link><pubDate>Fri, 05 Aug 2016 18:59:00 +0000</pubDate><guid>https://anystack.xyz/new-vps-blog-setup-guide/</guid><description>&lt;img src="https://anystack.xyz/images/2016/10/wordpressvps.png" alt="Featured image of post New VPS for the Blog - Setup Guide" /&gt;&lt;p&gt;I was using a VPS with Plesk Onyx to host the Blog, but even with Redis in a Docker container to make it faster, it wasn&amp;rsquo;t enough &amp;hellip;&lt;/p&gt;&#10;&lt;p&gt;So I have setup a small VPS on my dedicated server with Ubuntu 16.04 LTS using VMware vSphere 6. I will make another post about virtualization but in this post, we will talk only about the VPS setup with easyengine, which is really my favorite tool for WordPress setup. You can also read my first post about easyengine : &lt;a href="https://anystack.xyz/blazing-fast-wordpress-nginx-php7-redis/"&gt;Here&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;First step, easyengine install :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; wget -qO ee rt.cx/ee &amp;amp;&amp;amp; bash ee &#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then WordPress setup :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ee site create anystack.xyz --wpredis --php7 --letsencrypt &#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And it&amp;rsquo;s already good for the server setup with nginx, php7, mariadb, redis-cache and let&amp;rsquo;s encrypt for the SSL. Check your DNS are pointing to your server before launching let&amp;rsquo;s encrypt or it will fail to setup the SSL certificate.&lt;/p&gt;&#10;&lt;p&gt;But the work is not finished yet, because I have to upload my database and my files to get my content back. For that i will need to have access to the database, so let&amp;rsquo;s do that with phpmyadmin :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ee stack install --phpmyadmin &#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;phpmyadmin is now available at http://my-server-ip:22222&lt;/p&gt;&#10;&lt;p&gt;Butt protected by an ACL, and to change the user and the password, you just have to use :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ee secure --auth &#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And to have your login details for phpmyadmin :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; ee site info anystack.xyz &#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So I have now uploaded my database, and I need my files. But it&amp;rsquo;s not needed to install ftp. The easiest way to do, is to add a password to www-data and to allow sftp access :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; passwd www-data &#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And you will just have to replace /usr/sbin/nologin by /bin/bash in the file /etc/passwd. As FTP/SFTP client, I use &lt;a href="https://cyberduck.io/"&gt;Cyberduck&lt;/a&gt; which is the fastest client I have found, and you can use it for almost all protocol, including S3 storage at AWS or Google Drive.&lt;/p&gt;&#10;&lt;p&gt;After uploading my files, just have to purge the redis cache, and that&amp;rsquo;s already over.&#10;&lt;img loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://anystack.xyz/images/2016/10/Screenshot_2--1-.png"&gt;&lt;/p&gt;&#10;</description></item><item><title>How Cloudflare speed up and protect your website - Part 1.</title><link>https://anystack.xyz/cloudflare-speed-protect-website/</link><pubDate>Mon, 01 Aug 2016 18:57:00 +0000</pubDate><guid>https://anystack.xyz/cloudflare-speed-protect-website/</guid><description>&lt;img src="https://anystack.xyz/images/2016/10/network-map.png" alt="Featured image of post How Cloudflare speed up and protect your website - Part 1." /&gt;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;You don't know what is Cloudflare ? &lt;span style="line-height: 1.5;"&gt;So let's see how cloudflare make your website loading faster, and why you should already use it for all your websites.&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&#10;&lt;ol style="text-align: justify;"&gt;&#10; &lt;li&gt;&#10;&lt;h2&gt;&lt;span style="font-size: 18pt;"&gt;&lt;strong&gt;) Cloudflare DNS - Free &amp;amp; Fast&lt;/strong&gt;&lt;/span&gt;&lt;/h2&gt;&#10;&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p style="text-align: justify;"&gt;Cloudflare provide at first one of the best DNS hosting service available. And to make a website faster you can already start with using a fast DNS hosting.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;DNS Provider Speed Comparison by solvedns.com&lt;/strong&gt;&lt;/p&gt;&#10;![/images/2016/10/draw.jpg)&#10;&lt;p style="text-align: justify;"&gt;It's only few Milliseconds but as you can see, Cloudflare is faster than many other providers and most of them offer paid services only. So before paying few dollars for a Premium DNS package, you should try cloudflare. Another feature you will love, is a propagation time around 5 minutes when you edit a record on your DNS. So if you need to migrate your website soon, this is really a good reason to register now.&lt;/p&gt;&#10;&lt;h2 style="text-align: justify;"&gt;&lt;span style="font-size: 18pt;"&gt;&lt;strong&gt;2. ) Cloudflare - Reverse Proxy with caching &lt;/strong&gt;&lt;/span&gt;&lt;/h2&gt;&#10;&lt;p style="text-align: justify;"&gt;But cloudflare does not provide only DNS Hosting. It's also a complete solution to speed up and secure your website. For that when Cloudflare manage your DNS if you activate the optimization and security (orange cloud), instead of sending your server IP when a visitor make a DNS request, it will act as a proxy and all your visitors will view only the Cloudflare servers IP when they do a request.&lt;/p&gt;&#10;![/images/2016/10/overview.png)&#10;&lt;p style="text-align: justify;"&gt;And Cloudflare will not only act as a simple proxy, it will also cache all the static files and deliver them all around the World to your visitors from the nearest Cloudflare datacenter.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;The result is awesome because it will make your website faster as it will handle less requests, and it will also save a lot of bandwidth by limiting the number of file requests.&lt;/p&gt;&#10;&lt;p&gt;&lt;img loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://anystack.xyz/images/2016/10/0ea0ab24-290b-4b40-b974-57b2499162cf.png"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;As you can see, with 80 000 visitors per month, it's more than 20GB of bandwidth saved and also more than 20GB of static assets which have been delivered faster.&lt;/p&gt;&#10;&lt;h2 style="text-align: justify;"&gt;&lt;strong&gt;&lt;span style="font-size: 18pt;"&gt;3) Cloudflare - Website Protection&lt;/span&gt;&lt;/strong&gt;&lt;/h2&gt;&#10;&lt;p style="text-align: justify;"&gt;By acting as a proxy Cloudflare also provide a complete security solution which include :&lt;/p&gt;&#10;&lt;ul style="text-align: justify;"&gt;&#10; &lt;li style="text-align: justify;"&gt;&lt;strong&gt;Browser integrity check&lt;/strong&gt; : Each visitor request is checked using the HTTP header and if a thread is found it can be challenged using a captcha or blocked.&lt;/li&gt;&#10; &lt;li style="text-align: justify;"&gt;&lt;strong&gt;Visitor reputation&lt;/strong&gt; : Cloudflare analyze daily thousands of IP, and if a visitor try several times to perform any form of hack, it will be marked as a potential thread for Cloudflare&lt;/li&gt;&#10; &lt;li style="text-align: justify;"&gt;&lt;strong&gt;Page rules : &lt;/strong&gt;You can use the page rules to allow or disallow access to a part of your website. For example with wordpress your can use a high level of secuirty onthe page  http://yourdomain.com/wp-login.php to protect your website.&lt;/li&gt;&#10; &lt;li style="text-align: justify;"&gt;&lt;strong&gt;DDoS protection&lt;/strong&gt; : As  your visitors have to use cloudflare servers to get access to your website,  they will never have access to your server IP and any attack attempt will simply be blocked by the Cloudflare servers. &#10;&lt;p&gt;&lt;img loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://anystack.xyz/images/2016/10/reflection-attack-2.png"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;But to protect totally your server, you have to be sure there is not any records which point directly to your server. The most common error will be to have a email server with a MX record pointing  on your server IP.  In this case, Cloudflare will not be able to protect your website because the attacker will send the traffic directly on your server IP, and will not have to use the Cloudflare proxy.&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;span style="font-size: 18pt;"&gt;&lt;strong&gt;4) Cloudflare - Website Optimization&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;And if it wasn't enough, Cloudflare is also able to optimize your website. It can minify all your assets, including the html, reduce the number of connections, and with rocket loader it will make deliver your assets asynchronously. That mean instead of waiting for each file to be downloaded, with cloudflare your browser will download all the assets in the same time when you visit your website, and it will be up to 3x times faster.&lt;/p&gt;&#10;&lt;p&gt;&lt;img loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://anystack.xyz/images/2016/10/optimization-asynchronous-loading.png"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;The last optimization tool available for free is Rocket Loader, currently in beta, it's a script used by cloudflare to deliver your assets, without blocking the page display. It use the asynchronous loading to load your javascript at the end of the page display and this way it will really improve your pagespeed score. But like any beta, it could create error with some javascript or break your website design by loading too late some assets.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;For this reason you have 2 mode to use Rocket loader :&lt;/p&gt;&#10;&lt;ul style="text-align: justify;"&gt;&#10; &lt;li&gt;Automatic : Rocket loader will optimize any javascript available on your website but you have the ability to forbid the optimization manually by adding  data-cfasync="false" before the script source.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&amp;lt;script type=&amp;#34;text/javascript&amp;#34; data-cfasync=&amp;#34;false&amp;#34; src=&amp;#34;/js/tether.min.js&amp;#34;&amp;gt;&amp;lt;/script&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Manual : This time you will have to add &lt;strong&gt;data-cfasync=&amp;ldquo;true&amp;rdquo;&lt;/strong&gt; for each script you want to optimize with Rocket Loader&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;I will complete this article with the HTTP2 and Cloudflare in the next few days.&lt;/strong&gt;&lt;/p&gt;&#10;</description></item><item><title>Remove Query strings and add featured images in WordPress feeds</title><link>https://anystack.xyz/make-code-beautiful-wordpress/</link><pubDate>Thu, 30 Jun 2016 00:45:00 +0000</pubDate><guid>https://anystack.xyz/make-code-beautiful-wordpress/</guid><description>&lt;img src="https://anystack.xyz/images/2016/10/Screenshot_17.png" alt="Featured image of post Remove Query strings and add featured images in WordPress feeds" /&gt;&lt;p&gt;A small post today to share with you a small tips to remove all the queries strings from WordPress static assets, and also to add featured images of your posts in the WordPress feeds.&lt;/p&gt;&#10;&lt;ol&gt;&#10; &lt;li&gt;Go into your WordPress dashboard &amp;gt; Appearance &amp;gt; Editor&lt;/li&gt;&#10; &lt;li&gt;Then find the file functions.php of your theme&lt;/li&gt;&#10; &lt;li&gt;Add this code at the end of  functions.php&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;hr /&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;remove&lt;/span&gt; &lt;span class="n"&gt;queries&lt;/span&gt; &lt;span class="n"&gt;from&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="n"&gt;assets&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;function&lt;/span&gt; &lt;span class="n"&gt;_remove_script_version&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="o"&gt;$&lt;/span&gt;&lt;span class="n"&gt;src&lt;/span&gt; &lt;span class="p"&gt;){&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;$&lt;/span&gt;&lt;span class="n"&gt;parts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;explode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;?ver&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;$&lt;/span&gt;&lt;span class="n"&gt;src&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;$&lt;/span&gt;&lt;span class="n"&gt;parts&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;add_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;script_loader_src&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;_remove_script_version&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;add_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;style_loader_src&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;_remove_script_version&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;);&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="n"&gt;Include&lt;/span&gt; &lt;span class="n"&gt;thumbnails&lt;/span&gt; &lt;span class="n"&gt;is&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;RSS&lt;/span&gt; &lt;span class="n"&gt;feed&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;function&lt;/span&gt; &lt;span class="n"&gt;rss_post_thumbnail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;$&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;global&lt;/span&gt; &lt;span class="o"&gt;$&lt;/span&gt;&lt;span class="n"&gt;post&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;has_post_thumbnail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;$&lt;/span&gt;&lt;span class="n"&gt;post&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;ID&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;$&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&amp;lt;p&amp;gt;&amp;#39;&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="n"&gt;get_the_post_thumbnail&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;$&lt;/span&gt;&lt;span class="n"&gt;post&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;ID&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="s1"&gt;&amp;#39;&amp;lt;/p&amp;gt;&amp;#39;&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="n"&gt;get_the_content&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;$&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;add_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;the_excerpt_rss&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;rss_post_thumbnail&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;add_filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;the_content_feed&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;rss_post_thumbnail&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;hr /&gt;&#10;&lt;p&gt;You can now try with GTMetrix.com if you have succefully remove the query strings. For the feed, you can test it with any RSS feed reader. Your WordPress feed are normally available at &lt;a class="link" href="http://yourdomain.com/feed/" target="_blank" rel="noopener"&#13;&#10; &gt;http://yourdomain.com/feed/&lt;/a&gt;.&lt;/p&gt;&#10;</description></item><item><title>Ubuntu - Blazing fast WordPress with Nginx php7 redis</title><link>https://anystack.xyz/blazing-fast-wordpress-nginx-php7-redis/</link><pubDate>Sun, 26 Jun 2016 00:37:00 +0000</pubDate><guid>https://anystack.xyz/blazing-fast-wordpress-nginx-php7-redis/</guid><description>&lt;img src="https://anystack.xyz/images/2016/10/How-to-setup-a-Blazing-Fast-VPS.png" alt="Featured image of post Ubuntu - Blazing fast WordPress with Nginx php7 redis" /&gt;&lt;p style="text-align: justify;"&gt;You have buy a VPS to speed up WordPress, but you are using a control panel and it's not faster than before ? In this tutorial, you will learn how to setup a Blazing fast WordPress with Nginx php7 and redis cache.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;This will require to use the the command linux via SSH. Yes I know, it's less user friendly than a control panel. But it will not require any resources after the install and we have an &lt;strong&gt;amazing tools&lt;/strong&gt; to help us : &lt;a title="EasyEngine - Wordpress with Nginx" href="https://easyengine.io" target="_blank"&gt;EasyEngine&lt;/a&gt;&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;So, first we will talk about what we are going to install and why it will make WordPress faster.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;Nginx &lt;/strong&gt; : To pronounce "Engine X",  it's the web server created in 2002, created to handle high traffic with a low memory footprint. And this is the reason which explain why Nginx is so popular at the moment. It can also be used as a reverse proxy or as a load-balancer, which means if you have few small VPS, you will be able to create a stable and reliable platform to host your website.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;php7&lt;/strong&gt; : I will not explain what is the php but more about the difference between the 5.6 and the 7. It's the performance and there is nothing better than a small graphic to compare them. And WordPress is fully compatible with the latest version of php.&lt;/p&gt;&#10;&lt;p&gt;&lt;img loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://anystack.xyz/images/2016/10/0d47ba9e-a46d-4582-98f6-34317b219bb1.png"&gt;&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;MariaDB&lt;/strong&gt; : If you haven't already used it, MariaDB is a fork of Mysql from his creator, and it's an open-source solution which is currently faster than Mysql with a lower memory and processor footprint. So no need to hesitate, if you are still using msql, even in 5.7, it's time to move !&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;Redis&lt;/strong&gt; : What is Redis ? It's a remote dictionary server, which will manage your database and store the values in the memory. It's a "NoSQL" solution as Redis can be used as a database by writing data on your &lt;del&gt;hard drive&lt;/del&gt; SSD. For WordPress there is no faster solution as it will eliminate the queries to your database, and even if you are using Mariadb, it will be faster and using less resources.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;But you are maybe thinking it will be very hard to configure all that stuff properly. No, you will be able to do it in less than 10 minutes ! Because we are going to use EasyEngine, the most powerful tools to create an optimized WordPress website.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;It's a command line tool to create install and configure a complete web server with Nginx, PHP, MariaDB and Postfix in a single command. It also provide you the ability to manage properly your virtualhosts with Nginx and make it easy with simple command to use.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;So to start you need a VPS with Ubuntu 14.04. EasyEngine is also compatible with debian 7/8 and Ubuntu 16.04. But as EE has been build at first for ubuntu, it's the most stable solution.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;At first we need to install EasyEngine.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;wget -qO ee rt.cx/ee &amp;amp;&amp;amp; sudo bash ee&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;Done, EasyEngine is now ready to install what we need. So we are looking for WordPress with nginx, php7, redis and as it will not be harder, a SSL with let's encrypt. But you have the choice with EE :&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;A simple website for html :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ee site create example.com --html&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;A website with php :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ee site create example.com --php&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;A website with mysql :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ee site create example.com --mysql&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;A website with SSL by let's encrypt&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ee site create example.com --letsencrypt&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;And for WordPress ? You just have to choose :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ee site create example.com --wp # install wordpress without any page caching&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ee site create example.com --w3tc # install wordpress with w3-total-cache plugin&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ee site create example.com --wpsc # install wordpress with whisp-super-cache plugin&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ee site create example.com --wpfc # install wordpress + nginx fastcgi_cache&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ee site create example.com --wpredis # install wordpress + nginx redis_cache&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;So for my example, I will use :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ee site create yourwebsite.com --wpredis --letsencrypt --php7&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;You will have to enter Yes to the EE questions, and yes your wordpress with redis php7 and SSL is already installed and configured. You also have two plugins in WordPress :&lt;/p&gt;&#10;&lt;ul style="text-align: justify;"&gt;&#10; &lt;li&gt;Nginx Helper to clear the cache&lt;/li&gt;&#10; &lt;li&gt;Redis Cache : To connect WordPress with Redis and to clear the cache&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p style="text-align: justify;"&gt;But you will maybe ask how you can connect to the database, what is the user of mysql and wordpress ? You can use a custom user during the install process by using&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;--user=admin and -pass=password to set WordPress login details.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;But you can also look at the install log to find them as EE display it in the console :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-gdscript3" data-lang="gdscript3"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;nano&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nb"&gt;log&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;ee&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;install&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;log&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;To see all the commands available with the websites :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ee site&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;If you want to edit some default configuration (database, user etc) :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;nano /etc/ee/ee.conf&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;By default EasyEngine create a backend access with all tools you can install with it (phpmyadmin, cache, php infos) at the address : http://yourserverIP:22222&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;To secure it properly just use :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ee secure --auth&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;It will ask you for a user and a password. You can edit it at anytime.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;To edit the default port :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ee secure --port&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;And to get the mysql user of a website :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ee site info yoursite.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;So I recommend you to change the port of admin tools, and to install what you need in the following :&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;Adminer (phpmyadmin alternative )&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ee stack install --adminer&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;phpMyAdmin :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ee stack install --phpmyadmin&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;phpAdminRedis (to manage data in cache) :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ee stack install --phpredisadmin&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;All the Admin tools (Adminer, phpMyAdmin, phpMemcachedAdmin, FastCGI cleanup script, OPcache, Webgrind, Anemometer) :&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ee stack install --admin&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;You have to agree this tool is really awesome. And if you look to your memory usage using htop, you will see the difference with a control panel. Your website will be faster and you have the ability to edit your configuration or to add module when you want.&lt;/p&gt;&#10;&lt;p style="text-align: justify;"&gt;So to conclude this tutorial here the links you will need to understand perfectly EasyEngine and to use it for all your setup :&lt;/p&gt;&#10;&lt;ul style="text-align: justify;"&gt;&#10; &lt;li&gt;&lt;a href="https://easyengine.io/wordpress-nginx/tutorials/conventions/" target="_blank"&gt;The File-System Layout &lt;/a&gt;&lt;/li&gt;&#10; &lt;li&gt;&lt;a href="https://easyengine.io/docs/commands/site/create/" target="_blank"&gt;The site create command&lt;/a&gt;&lt;/li&gt;&#10; &lt;li&gt;&lt;a href="https://easyengine.io/wordpress-nginx/tutorials/" target="_blank"&gt;All the tutorials&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p style="text-align: justify;"&gt;Leave a comment if you have any question !&lt;/p&gt;&#10;&lt;p&gt; &lt;/p&gt;&#10;</description></item></channel></rss>