My Experiences with WordCamps in India! [TDIS]

It is now over a week since I attended my second WordCamp. The first one I attended in Mumbai, India – where I was slightly disappointed with the lack of WordPress related discussions. But I was not really complaining and looked forward to another one in the city of Baroda. The WordCamp in Baroda was better than the Mumbai event as it had more WordPress related content being discussed and shared.

I thought, I would sit down and write my views on WordCamps that I have attended. The idea of this post is to take stock of how things might be at WordCamps being hosted in India and how could they get better.

WordPress Logo 

What I found lacking at WordCamps!

WordPress is not exactly very popular in India. It has a decent following but nowhere developed like it is say in western countries. I think there were some basic things that I found lacking at WordCamps I attended.

  • Local meetups arranged prior to WordCamps seem to be few if not completely absent. Having meetups will be a good idea as this will give a good idea to organizers on how much local enthusiasm is there for the WordCamps. It will also help drum up support for WordCamps.
  • People love to volunteer and get involved. But people who want to get involved need a platform to get involved. I think more work can be done to build better smaller local communities which can be more accessible.
  • The talk sessions sometimes are more centered around social media and SEO tips. I personally find this a waste of time when social media marketing tips and SEO tutorials are shared which have nothing to do with WordPress.
  • I did not come across any good sessions on basic introduction to WordPress. This I think is a must have session for any WordCamp.
  • I was also a little disappointed that WordCamps I attended hardly saw a mention of how people should contribute to WordPress. It is important that as open-source community we think of making and adding to WordPress more than just taking from it.

I won’t be too harsh on the two WordCamps that I attended as I saw organizers themselves sharing their experiences with other organizers very freely. This is crucial as sharing their experiences will improve WordCamps a lot more in the future.

What I would like to see in India’s WordPress community

I am using the word ‘community’ instead of ‘WordCamp’ on purpose.

  • I would love to see organizers write down a detailed list of difficulties they came across while arranging a WordCamp. This would be a great resource to future WordCamp organizers.
  • Another idea is for organizers to help first time speakers. First time speakers are often unsure about their sessions and maybe a list of things to do, guides on how to go about presenting a session and what they should talk about might be of great use to them.
  • Finally, I would love to see a session called ‘Basics of WordPress’ for people who simply have no idea of what WordPress is all about. This could be like a 10 minute session.
  • Finally, I would like a lot local casual meetups. It would also be great if people who take part in such meetups write and share what they discussed during these gatherings.

India’s love affair with WordPress is simply beginning!

I suspect India does not have a very strong WordPress community. There is a lot of interest in it surely but most students are not exactly aware of it. There are many WordPress developers who work freelance in India. But many of them are not exactly organized as a community. Hopefully with more WordCamps all that will change slowly by surely.

As WordPress is open-source, it’s biggest supporters will always be college going kids who do not exactly have a lot of resources but have the adventurous spirit to learn new things.

Considering India will have a lot of young people who might not find fancy jobs in IT, I am sort of betting on them finding their true calling with WordPress. :-)

Useful Links for WordCamp and WordPress Meetup Organizers

If you are interested in taking part in WordCamps or organizing them you might find some of these links useful.

Finally, as I was writing about WordCamps in India, let me inform you about the next one. WordCamp Pune 2013 will be held on the 23rd &24th February 2013.

Special thanks to Rahul Banker, who did a great job of organizing WordCamp – Baroda 2013.

Do drop in your comments and views about WordCamps and WordPress events in India.

Editor’s Note: This post is part of our TDIS ( Thank Devil It’s Sunday) feature, where we publish casual and personal posts.

WordCamp to be held in Mumbai, India – Oct 20-21, 2012

Last year, the WordPress conference called WordCamp was held in Jabalpur, India. Despite Jabalpur being a smaller town compared to the big metros in India, it was a well attended and a successful WordCamp.

This year, WordCamp is taking place in Mumbai on October 20-21, 2012.

WordCamp Mumbai 2012

What will happen at WordCamp Mumbai?

The event mainly spread over two days. Many WordPress geeks, bloggers will be attending to discuss and share ideas about the WordPress platform. The event will also feature many speakers who have confirmed participations.

The list of speakers includes Philip Arthur Moore, a WordPress Theme Wrangler with Automattic Inc (the company at the core of development for WordPress)

Registration for WordCamp Mumbai

You can register for WordCamp Mumbai online. There are two types of tickets “Developer’s Track” and “User Track”.

Both the tickets cost INR 1500/- but you can avail of a discount coupon for INR 500.

Visit the registration page for WordCamp Mumbai 2012 and use the discount code “Devilsworkshop”.

The discount code will work for both “Developer’s track” and “User Track” tickets.

On a personal note, I have already registered for WordCamp – Mumbai and if you too are attending it, drop in a comment and I will make sure to catch up with you at the event.

Links: WordCamp Mumbai

Starting WordPress-Nginx Tutorial Series

(cross-posted from rtCamp blog)

It has been almost 3 years that we moved our high-traffic blog Devils Workshop to Nginx – one of the fastest web server out there.

When I started with Nginx, there was very less help available. I spent most of my time on Nginx IRC channel, mailing lists and forums.

What looked like a crazy move then, seems totally worth now. We handle almost half-million hits daily for more than 20 sites hosted on our dedicated server without any slowdown or downtime. I feel proud to switch to Nginx much earlier. As an early mover, I leaned way too many things myself as there was no alternative then.

Today, as a server-administrator, I feel that I have learned enough to authoritatively write down my own findings here as a series of articles. I hope you will find this helpful.

You can find more details about this series, its content and other details here.

I will be publishing one article everyday on rtCamp’s blog. You can subscribe to rtCamp’s blog easily.

At any time, you can use our free support forum if you need some technical help. Comments will be kept open to discuss article itself.

I hope you will find this series useful. :-)

Link: Official rtCamp Post with more details

Disable small gravatars in bbPress for better performance

If you are using bbPress for your forums you would notice a lot of tiny gravatars alongside each author name ( unless you are using a custom bbPress theme ). These images are 14×14 in dimension, and depending on the no. of forums/topics you are displaying in a single page you could end up sending a lot of tiny requests for each image. This could effect the performance and load time of your page.

You can apply the following filters to remove the images and just display the name of the user.


function rtp_remove_bbp_author_gravatar( ) {
    return null;
}

function rtp_remove_bbp_gravatar( $author_link, $args ) {
    return preg_replace('/ /iU', '', $author_link );
}

function rtp_remove_bbp_remove_author_gravatar_link( $author_link, $args ) {
    return preg_replace('/<\/a>/iU', '', $author_link );
}

add_filter( 'bbp_get_author_link', 'rtp_remove_bbp_gravatar', '', 2 );
add_filter( 'bbp_get_topic_author_display_name', 'rtp_remove_bbp_gravatar', '', 2 );
add_filter( 'bbp_get_reply_author_link', 'rtp_remove_bbp_gravatar', '', 2 );
add_filter( 'bbp_get_topic_author_avatar', 'rtp_remove_bbp_author_gravatar' );
add_filter( 'bbp_get_topic_author_link', 'rtp_remove_bbp_remove_author_gravatar_link', '', 2 );

Fix File Permission on Linux/Mac Server

Over the time, file permissions get messy on a linux/mac server. It really annoys (me) to see static files like images have 0755 i.e. executable permission set for them.

You can use following commands to fix permissions:

find . -type d -print0 | xargs -0 chmod 0775
find . -type f -print0 | xargs -0 chmod 0664

I found many scripts and tools to do this job. IMHO, above command does what we really need!

For WordPress

Ideally, on a wordpress site, no files under “wp-content/uploads” directory should be executable. In case of WordPress multisite, it will be “wp-content/blogs.dir” directory.

Its better to fix file-permissions periodically on your WordPress setup.

MaxCDN – Updating IP Address when moving servers

If you use MaxCDN to speed-up your WordPress blog/site, then you may face one issue during server migration. The issue is – IP-address of new server will not get updated in MaxCDN automatically. You need to do this manually like below:

Steps to Update IP Address on MaxCDN:

  1. Login to MaxCDN account. Go to “Manage Zones”.
  2. Go to “Pull Zone” which you like to update.
  3. Then go to “Settings” tab.
  4. You will see a section titled “Origin Information”.  That will contain IP address of your old server. Click the “Edit” button in that section. (see screenshot) 
  5. Then enter new IP-address in “Origin IP” field and click the “Update” button.  (see screenshot) 

Why don’t MaxCDN update IP address manually?

Its common to perform some testing on a test server, and then use another server, a different one, for production site. So IP-address change is not something very uncommon.

MaxCDN uses IP address to serve content faster. But rather than automatically updating their cache, say daily, they keep it forever! While I like the manual option to “Update” IP address is settings area, which gives advance users some control, it would be better if MaxCDN combine this manual option with automated cache-update.

Smart Auto-Update: A smart solution would be to update IP-Address when “Origin Server” starts returning HTTP 404-error. When there will be too many 404-errors, it may mean the server has been moved. Of course, CDN misconfiguration or origin server-downtime can also result in 404-error but “Smart” programs supposed too handle such cases as well!

Recommended Reading: How to Setup MaxCDN on WordPress using W3 Total Cache Plugin

[Infographic] WordPress in Numbers!

WordPress it seems is growing at a faster rather than ever before. But it is not just growth that is interesting but also its how it is being adopted by popular websites. For instance 48% of the top 100 blogs use WordPress.

Yoast recently featured a nice infographic about various statistics related to WordPress.

wordpress_stats_infographic

What do you think about these numbers? Do drop in your comments.

[Stats] WordPress Platform Used by 48% of the top 100 Blogs!

This blog runs on self-hosted WordPress platform, hence I have always been interesting in keeping tabs on the popularity of WordPress. Blogging as an activity is also at a all-time high and WordPress seems to dominate the top 100 blogs. According to Pingdom, out of the top 100 blogs in the world, 48 have adopted WordPress.

Interestingly 39% of these top blogs are using self-hosted WordPress while 9% are using WordPress hosted service. That means more blogs use WordPress hosted than any other popular platform.

Movable Type which was quite popular once as a blogging platform is losing steam fast. This might because the top 100 blogs might have changed and chances are newer blogs are more prone to use WordPress.

Tumblr over the past year has really grown a lot. I wrote about how it has a lot more pageviews than WordPress.com or Blogspot.com blogs. While WordPress.com actually dominates with more visitors than other blogging platforms, clearly showing it seems to be better from a search engine optimization perspective.

This blog too started on Blogger and later migrated to self-hosted WordPress. If you are blogging which platform are you using? Do drop in your comments.

Case Study: Devils Workshop switched to rtPanel

rtPanel is a flagship product of rtCamp launched as open-source for WordPress enthusiast. rtPanel is a WordPress Theme Framework and forms a standard base for theme developers to create awesome themes. rtPanel team also offer free technical support to developers.

Why did we move?

rtPanel has been growing rapidly (already crossed 5000+ downloads mark). The optimized mark-up of rtPanel framework, improves the site speed and SEO capability. DevilsWorkshop being a part of rtCamp, we decided to use it as a case study to show rtPanel’s capability.  It was a perfect example to consider, as it has a huge reader base, vast content, multiple authors and different functional elements.

We also used this opportunity to rebrand the website with even better looks and refreshing design. Read this to know more about re-design.

Devilsworkshop was earlier running over rtBase framework (internally used in rtCamp). It was later evolved over 2 years of experiential learning with more than 1000+ WordPress projects. The ultimate goal of bringing it to public, was later achieved with launch of rtPanel.

A Good Friday:

On a fine morning of a Friday (February 5, 2012), we just decided to switch Devils’ Workshop on rtPanel. The development was done on live site and within 3 working days it was implemented.

 

The results are beyond our expectations and it concluded that rtPanel framework can truly do wonders. The increase in traffic was due the optimized markup and default integration of Yoast SEO plugin. The increased traffic ultimately lead to increase in Google Adsense revenue by whooping 85%.

Reference Screenshots:

1. Page Load Time

Page Load time for Devils Workshop

2.  Visitors Traffic

*Bounce rate is increased, as during design phase, the navigation to archive posts was not given. Now its been corrected, and we hopefully will see the better bounce rate in next months stats.

3. Adsense Revenue

AdSense Stats  - DevilsWorkshop

Do drop in your comments.

Related: Devils’ Workshop gets a New Logo and New Design

Remove “eval(base64_decode” using linux commands from all php files across multiple WordPress

Yesterday, almost all installations on our test server had been infected by infamous “<?php eval(base64_decode(…)) ?>” code injection.

We have more than 600 demo sites on our test server and cleaning them using any WordPress plugin out there was simply out of the question! Can you imagine logging into each WordPress, installing plugin, then scanning/cleaning up WordPress… for 600+ WordPress sites?

Below is combination of Linux commands we used.  Assuming you have logged into a Linux Shell and already have BACKUP of all files (including infected files) lets move ahead!

Command to list all infected files:

grep -lr --include=*.php "eval(base64_decode" /path/to/webroot

This is not necessary but its better to check some files manually to confirm if they have malicious code we are looking for. Also we can use this command after running cleanup command to crosscheck if cleanup is really successful.

Command to remove malicious code:

If above command gives you correct output, execute following command to perform actual cleaning:

grep -lr --include=*.php "eval(base64_decode" /path/to/webroot | xargs sed -i.bak 's/<?php eval(base64_decode[^;]*;/<?php\n/g'

Executing above will remove eval(*) codes.  Above command will also generate a backup version of files it will modify. For example, if it removes code from index.php, you will find a new file index.php.bak in same directory with original content of index.php

Now after running above command, you still find some more infected files, then you need to adjust search and replace parameters in for “sed” part.    You may also use following command for a “liberal” cleaning at the risk of breaking something. (in case you really break something, like I did, you can jump to “Troubleshooting” section below!)

grep -lr --include=*.php "eval(base64_decode" /path/to/webroot | xargs sed -i.bak '/eval(base64_decode*/d'

Trying to avoid re-appearance of this code injection

Its really though to cover every possible way to protect yourself from such attach in this post.

If you remember, WordPress community faced this kind of issue because of WP-PhpMyAdmin plugin sometime back. In our case, we found some old WordPress demo sites were having that plugin installed.

To remove WP-PhpMyAdmin plugin form all WordPress sites on your server, execute following command:

find /path/to/webroot -name "wp-phpmyadmin" -type d | xargs rm -rf

Above is all we did to get rid of eval(base64_decode(*)) codes from all files on our test server. If this happens again on our server, I will update this post with added info.

Troubleshooting:

Just in case you end up in a mess, below are some useful commands.

Missing <?php tag in the beginning:

To add “<?php: tag in the beginning of index.php files, in case if you remove it accidentally use following command:

find /var/www/ -name "index.php" | grep "/htdocs/index.php" | xargs grep -L "<?php" | xargs sed -i "1s/^/<?php \n/"

Don’t worry. If you already have a “<?php ” tag in the beginning, it won’t be added again.

Extra Newlines at the top!

If you find after cleanup, extra newlines at the top of your code, then use following command to remove trailing newlines. Extra newlines creates problem for blog feeds.

find . -name '*.php' -exec sed -i -e :a -e '/^\n*$/{$d;N;ba' -e '}' '{}' \;

I hope you will find this stuff useful.