Easy WordPress-NGINX Configuration – EasyEngine

In my last post, I Want to Restart Blogging, I talked about setting up a WordPress site in less than 5 mins using EasyEngine. Actually, I talked very less about the advantages of EasyEngine. In this post, I’m going to take you to the world of Lightning Fast WordPress using simple WordPress-NGINX Configuration achieved using EasyEngine.

Why WordPress-NGINX?

Apache is the world’s most used web server. So, why to opt for an NGINX based server. I’m going to start with an image which tells you a well-known secret.

An Eye Opening Analysis – Source: nginx.com

The above analysis tells us the usage percentage of different popular servers in the world based on its usage in all the websites; usage in top 1,000,000; top 100,000; top 10,000 and top 1,000 websites. Apache is overall definitely a very popular web server. But, when it comes to top 10,000 or top 1,000 websites by usage, NGINX surpasses them to be the most widely used web server. It shows that NGINX has definitely an edge over Apache.

Google’s server seems a popular web server in top 1,000. But, it is a costly web server. Further, as it is only popular among top 1,000 websites, it means Google web server is definitely good. But, Google’s Server is not for all. It is a premium service.

One more interesting thing is even WordPress are using nginx for its own servers. You may check it out at the following pages. WordPress.COM and WordPress.ORG.

Nginx – High Performance Web Server

Here are some benefits of using nginx in simple language:

  • Nginx is fast because it does not need to create a new process for each new request.
  • Nginx uses very little memory, especially for static Web pages.
  • Nginx can be used with a range of systems.
  • Nginx is highly scalable, and performance is not dependent on hardware.
  • Nginx is easy to install and configure.
  • Nginx has very less CPU load

However, there is an overlooked fact here. Apache is used by a heavy number of top 1,000 websites. So, those websites with best minds on the earth behind them must be getting phenomenal result with Apache too. The thing is Apache needs some tweaking which is not simple to do. Tweaking nginx is easy. Even on low-budget and nil tweaking, nginx gives impressive results.

Why EasyEngine?

Before going into the question, why EasyEngine, I should answer what is EasyEngine.

EasyEngineEngineered with Simplicity

In 2010, one of my website TheApplePirates.com became a hit within a month of its launch. It was getting more than 10,000 pageviews a day. It was my first website to get such a good response. I had invested in just domain name for this website. Hosting was from a free one. So, it was becoming slow after the traffic crossed 5,000 a day mark. It was the first time that I went first to a VPS Server, then to a dedicated server. Being completely in an unknown arena. At that time, I came to know about some packages like Alternate PHP Caching (APC), Varnish, memcached, eAccelerator and other such names. I researched a lot those days and tried to implement few on my server. It took me more than 3 days to make APC working on my server. I know, I’m not a technical guy with any degree or even diploma in computers. But, spending 3 days to make APC work that too without a splendid performance. Its insane.

Anyways, after the recent success of my websites, once again I was forced to try my luck with memcached and nginx. It was real pain to make all these packages to work together. If you have tried to do the same. I’m sorry for your wastage of time. The answer to all these complex installation could be a very simple to use customized Package EasyEngine.

EasyEngine with not more than 3-4 commands can install a nginx based server with PHP5-FPM, MySQL and added features like FastCGI, memcached, Zend OPcache, Google Pagespeed, Postfix. It is a package made especially for WordPress and its performance optimisation. It gives option for a WordPress website to be created with page caching support using optimal setting for either of FastCGI or WP Total Cache or WP Super Cache and also with no page cache. Further, one can use it for WordPress subdomain or sub-directory installation too. Using EasyEngine on a fresh server, one can install 12 types of WordPress install in less than 5 mins. An interesting feature, it tweaks its configuration itself as per available hardware resources. However, for optimal use, I recommend to tweak the configuration of packages included as per your requirements.

EasyEngine blends compatible and latest packages together to give a stable environment. Regular updates are released which are easy to install with a single command. However, the tweaks and settings remain unchanged after update. I’m using SSD-VPS from Virpus Hosting for this website. At Virpus Hosting, by paying just $ 5 per month one can set up a website using EasyEngine to easily support a WordPress blog to handle daily traffic of 1,000-2,000 that too with a page load time of under a sec. If you are a blogging for long, you must think I’m giving false picture. But, this is true. Using EasyEngine along with few plugins that I’ll tell you in coming posts. You can do it without hassle.

The beauty of EasyEngine lies in its simplicity, flexibility, cost effectiveness and performance. I give 5 out of 5 in all these segment to EasyEngine. There is more alternative to EasyEngine – Like LAMP, WAMP, MAMP, XAMPP. But, all are Apache based packages. I would love to test package similar to EasyEngine for nginx if you can suggest some.

Installation of EasyEngine

Installation of EasyEngine is quite simple and Easy. Get a fresh server. If you want for testing, you can use an instance from Amazon EC2, else for deployment of your WordPress blog get a VPS from Virpus Hosting. EasyEngine currently supports Ubuntu and Debian 6/7. I prefer Ubuntu over Debian due to its wide popularity.

Once you get root access to your server via command line (Putty), the first step should be to update the server to latest using following command. Press y, if it needs permission during update.

apt-get update && apt-get upgrade && apt-get dist-upgrade

Next, run the following command. It will install EasyEngine. During the run, you will be asked to enter your name and email id.

wget -qO ee rt.cx/ee && sudo bash ee

Once completed, run the below command. It will install MySQL, NGINX, PHP5-FPM, HHVM along with Opcache, WP-CLI, phpMyAdmin, Adminer and other useful packages.

ee stack install

There would be HTTP Auth Username and Password on the screen, once the command will end installation. Save it. Keep the credentials safe.

Now, you are all set to install your website. Use the below command to install WordPress.

ee site create www.facebook.com –wpfc

Replace www.facebook.com with your own domain name. Copy and save WordPress admin Username and Password from the screen.

Above command will use nginx’s own page cache FastCGI. You may use other commands from EasyEngine for using W3 Total Cache, WP Super Cache and no page cache.

Now, just point your domain’s dns to the IP address of your server. Once this is done. You can see your blog right away with easy WordPress-NGINX Configuration.

I suggest using CloudFlare for dns hosting and other optimisation. If you are using CloudFlare, you can change the IP address within few seconds to point to your new server.

I would write in subsequent posts about customisation of EasyEngine. Further, I’ll try to make you familiarise with basic architecture of file system in EasyEngine.

If you liked the post, do give a feedback. I would love to hear your response.

Liked my Post. Be My Companion in My JourneyJoin Me

I Want to Restart Blogging

People often say when you are at the bottom, there is only one way possible. Upward.

That’s Not Me. I Can’t Sit Idle and Cry.

Hello, I’m Abhishek Rukhaiyar. I’m a blogger.

I’m doing blogging for last 7 years. It all started with an idea to share my thoughts with everyone. I gained phenomenal success. Two of my website gained success. Overall I was earning around USD 2,500 per month. However, the success lasted for 4-5 months only. Here is a snapshot of traffic to one of my website I Want Govt Job (formerly For Hire).

A Graph Nobody Likes to See

You can see the peak in March, 2014. It was the golden period. The best ever pageview of 127,173 views was on March 04, 2014. Almost same sort of story is with this blog, Rukhaiyar’s Corner. It got its best ever pageviews on Jan 19, 2014 with 58,350 views. Now, the average view is 300-400 per day.

There was a time in Sep 2013 when I was telling my friends that I dream of earning someday USD 100 a day from Google Adsense. I was targeting it by the end of 2014. At that time  I was earning USD 15-16 a day. I never thought that I’m actually on a dream run. The wishes, the dreams I’m having is going to be true much before my target.

In the month of Dec, on 23rd Dec,2013 to be precise, I touched the magical figure of USD 100 a day (USD 122). It did not end just there, On 29th Dec, 2013 I earned most till date of my single day earning USD 170. It did not end just here. Between Feb 12, 2014 to March 16, 2014, my earning never went below USD 100 any single day. That were the Days of Glory.

Glory Days Which Makes Me Feel Proud

Last month, first time I Want Govt Job was in loss. Rukhaiyar’s Corner is giving marginal profit of USD 10-15 a month. I’ve seen this debacle. I’ve seen myself going to the Top, then to the bottom. I want to flip my luck again. I want to live again the life of a successful blogger. I want to Restart Blogging. I want to start it all over again.

There is positive sides of failure always. You learn more when you fail from being on top than ever. You analyze what you did wrong. Where your luck failed you and where you took a wrong decisions.

I remember back in 2005, in my college when I had my first PC, within 5 days of me getting a PC, I tried to change the boot screen manually. In the process, I accidentally hid one of the partition of my PC and corrupted the boot file. At that time when I was scared, one of my friend told me that you can learn only with your failures. If you never try with the fear of failure, you would never learn. I used to go to computer room which had internet. I used to read about the solution and I used to come back to try it on my PC. This happened for more than 24 hours and I slept just 3-4 hours in between. Finally, I was able to both fix the boot file and recover the lost partition. I even learned how to change the boot screen. That was my first success for self learning and understanding the power of Internet.

I might be distressed now. But, I want to forget everything now and start from the scratch. I want to take the past success period as an experience phase for bigger success. I want to summarise what I learned in the last two years:

  1. I learned managing a dedicated server without cPanel. Earlier, till the success of 2013, I was heavily dependent on cPanel for managing my websites. Even when I first used a dedicated server in 2010. I got stuck with just an IP address, username and password. I spent a whole day to install cPanel and even GUI of Linux for managing my website. However, gone are the days. Now, I run whole server with command line without ever feeling need for cPanel.
  2. I learned working on nginx server.  I came to know about the low CPU load and other benefits of working on nginx rather than Apache. However, I was knowing nothing about nginx and how to set it up with php and mysql. However, thanks to my best pal, Internet. I learned it all and setup a working server with nginx.
  3. My biggest friend EasyEngine. Thanks to the guys at RT Camp. I came to realize that they have developed a package of nginx-php-mysql with memcached. The package can install the nginx server with decently optimised setting and proper documents to easily setup a WordPress website in less than 5 mins.

    Target to Load Under a Sec
  4. I learned a lot many techniques of link building, SEO optimization, webpage optimisation. I learned minification, CDN setup and many more techniques to load my website with Blazing Fast speed.
  5. I learned to use Google’s PageSpeed module in my server to do a lot many optimisation right from server.
  6. I learned to set up Cloudflare based flexible SSL. I tried and failed many times to set up my websites as secure and encrypted with SSL certificate from Cloudflare. However, lastly I got success in fixing it.

There is more in the list. However, knowledge is useful when you can use it. So, I want to use it and spread it. I want to teach everything I know to others. I want none to do the mistakes I did. Yes, nobody can taste success without failure. But, I want them to be trained to face the difficulties I have faced.

My Marriage

Me With the Beautiful Lady

Last year, I got married with a wonderful girl, Simran. She is down to earth, typical Indian Girl.

She don’t have technical knowledge about either WordPress or blogging. But, she has an eagerness to learn. I have gradually shifted my website I Want Govt Job to her. She is handling the content section of the website. It is a Job portal which needs daily updating. She has become part of the blogging business now.

Now, my responsibility is more. I have to start thinking about my family. We would be lucky to have a kid some day. I have to start preparing for the future. I have to be ready. For the records, I’ve a full-time 5 day Job. I’m just a part-time blogger. But, I’ve a dream to be independent. I love blogging and I love writing. I want to make a full-time career in blogging.

Last year, I published just eight articles on Rukhaiyar’s Corner. This year till date just one article is published by me. I have to restart blogging. I have to constantly update the blog.

I am targeting an income of USD 1,000 per month till Dec 2015. However, this time I’m going to be with you in my Journey to Success. I need your encouragement and feedback. I’m going to share with you my methods and my monthly income report. If you want to encourage me in restarting my blogging career, I would be honoured.

Be My Companion in My JourneyJoin Me

Introduction From Basic: What is WordPress?

Many of you who are familiar with blogging, when told about blogging the first thing that comes in mind is a blog on Google Blogger. It was a purchased by Google in 2003 started by Pyra Labs. It became the most popular platform for blogging. However, Blogger has some limitations like:

  • You can’t customize much in respect of appearance or features. You have to do a lot of research if you are not a pro.
  • It is hosted and owned by Google. They can shut it down any time. They can act and remove your blog on complain without any warning. Copyright violation, DMCA notice any such notice to Google will result in immediate removal of your blog.
  • The most important of all is Blogger is outdated and not a preferential service of Google. They are not keen in updating the service with latest advancement in blogging and make it more user and customization friendly.

In between a lot of alternative services flourished. WordPress, Drupal, Joomla and others. Google Blogger is used mostly for regular blogging only. However, these services are referred as Content Management Service (CMS). These are used to create a lot many different sort of website than just a blogging website. One may see the current market share of all the Content Management Services CMSs here.

You may see WordPress has developed as a giant for CMS. Drupal and Joomla both give software which could be easily installed on hosting environment to create your website and comes with Open-source License. Hence, one could customize it easily. However, WordPress provides both Google Blogger type blogging platform where you can sign up and start blogging and Open-Source Licensed software which you could install on self-hosting environment like Drupal and Joomla.

WordPress blogging platform is available at www.WordPress.com. It is popularly referred as WordPress.COM. The self-hosted blogging software could be downloaded at www.wordpress.org. This is referred commonly as WordPress.ORG or self-hosted wordpress.

Just like Google Blogger, WordPress.com has some restrictions. However, their blogging environment is much more advanced than Google Blogger. Customization and many add-on services are allowed as premium services on payment. There are almost 60 Million blogs hosted on WordPress.com. If you are a novice and want to create a wonderful looking blog where you can start writing without nothing to worry about, choose WordPress.com.

WordPress.ORG gives all the capability of customization and personalization. The customization and personalization could be achieved easily by more than 2,500 free themes and 30,000 free plugins. In order to set up your WordPress.ORG blog, you need to get a hosting account at HostGator, BlueHost, JustHost or other such hosting company. Plus you need your own domain name which you can get at GoDaddy. Most of the hosting company give domain name at the time of registering for their service. But, it’s better that you use your own domain name from GoDaddy. As it will be easy if you wish to change hosting company in future. In later articles I will give your more details about blogging with WordPress. Enjoy!