Is Your Awesome Site Mobile Friendly Too?

Image - mobile friendly sitesToday is the day when Google has started implementing mobile friendliness as a search engine ranking factor. The actual announcement in this regard was done two months ago in the official WebMasterCentral blog. It also started showing a tiny warning in the official blog since then. If you use WordPress and if your site is not mobile friendly, yet, there are options to convert it (for free) to fit into mobiles nicely.

Continue reading “Is Your Awesome Site Mobile Friendly Too?”

2013 Year in Review

We are already in 2014. However, it is probably the right time to take a look back at what happened last year.

Among so many things happened in 2013, the following come on top of my head. These events and products are related to performance, WordPress, security and other misc stuff. Please feel free to comment, if I missed anything.

Google Compute Engine became generally available in December 12, 2013. Continue reading “2013 Year in Review”

W3 Total Cache configuration for Nginx-Apache server stack

During the past 24 hours, there were two people had the following situation and were looking for a solution. Their use-case is…

I’m currently using a Nginx frontend / Apache backend setup. The W3 Total Cache plugin detects Apache and will only show me the Apache rewrite rules.

Here’s another quote from the other person who was looking for a similar solution…

The nginx.conf file does not exist. W3 Total Cache plugin detects that Apache is running – thus gives me the rewrites for that webserver instead. I am using Nignx in front of Apache – not a Nginx/PHP-FPM solution

Interesting, but not uncommon. So, I dived in and modified my existing Nginx rules for WP Super Cache plugin and provided a unique solution. Continue reading “W3 Total Cache configuration for Nginx-Apache server stack”

Efficient 301 Redirects

Traditionally, web sites use either www or non-www version to display their content to the visitors. Sub-domains are also becoming popular in recent times. When www is chosen as the preferred domain when installing WordPress (or after installing WordPress), whenever a visitor types non-www version of the site, WordPress redirects the visitor to the correct URL, the www version the site, through an internal 301 redirect. Google recommends this 301 redirect and Google WebMaster Tools has an option to set the preferred domain too. Continue reading “Efficient 301 Redirects”

Early Spam Comment Removal

No one likes spam. Akismet has been doing a great job in keeping WordPress blogs clean from spam comments. Thousands of spam comments per hour can increase the overload in the database. You know what I mean, if your site is famous and yet if you are running on a server with limited resources. You may want to make sure your site’s database is as lean as possible. Ideally, you’d want to clean the spam from the WordPress as often as possible. An hourly / nightly / weekly cleaning is what you’d probably need. By default, Akismet purges old spam comments that are over 30 days old. Here’s a little script that is triggered by a cron job and runs on the server side, thus reducing the overhead on WordPress to make it faster. Since, this little script can increase the performance (to a tiniest extend), you may choose this, instead of waiting for Akismet to clear spam after 30 days. Continue reading “Early Spam Comment Removal”

Akismet Nginx Rewrite Rules

Akismet WordPress plugin is one of the popular plugins for personal WordPress blogs. Nginx is one of the evolving web server, just surpassing Microsoft’s IIS in terms of the usage to be just behind Apache. The ‘bad’ guys always find new ways to exploit a site. Ever since version 2.5.7, Akismet introduced a new .htaccess file to block direct access to PHP files. The content of that .htaccess file goes like this… Continue reading “Akismet Nginx Rewrite Rules”

Fix Incorrect IP Address in WP Comments

Image of an IP logoThe cost of running a VPS is becoming cheaper and cheaper. There are more things we could get for the same bucks. Once your site is ready for a VPS, there are multiple server stack options available, than the traditional LAMP setup. For example, you could completely ignore Apache and can use Nginx with php-fpm . Either case, you wouldn’t have any issues related to IPs in comments. However, on a complicated setups, such as Varnish => Nginx => php-fpm or Nginx => Apache, or Varnish => Apache, WordPress doesn’t display the IP address of the visitors correctly. There is nothing wrong with WordPress. It’s all about the implementation. Forwarding the correct client IP can be tricky as the complexity of the server stack increases. There are situations where you just don’t have any options to forward the correct address. Continue reading “Fix Incorrect IP Address in WP Comments”