Create a WordPress Administrator user account using SQL

I have worked to restore a WordPress site from backup. Having looked at the database, I do not have access administrator access, so I have decided to write-up SQL script  to create a WordPress Administrator user account using SQL.

I know  probably a lot of other people have documented this. I am going to post it here so that I can find this when I need this in future…

Scaling WordPress (

Almost two years ago, I re-joined the ProductiveMuslim Team as WordPress Developer (Volunteer). I say re-joined because I did get involved with the project for a very limited period during my university years.

Over the last two years, I have seen the number of unique visitors to ProductiveMuslim go from 20k/month to 90k/month average.

Scaling WordPress ( - Audience Overview

Scaling WordPress ( – Audience Overview

The challenge of Scaling WordPress

One of the many challenges a developer face is scaling the app to support the growing business. ProductiveMuslim is no exception to this.

Since 2011 we have migrated from one hosting company to another. Brother Raneez who has been part of the team a lot longer than me, reminded the migration saga on twitter recently. outgrown servers capacity very quickly, which lead to site going down at times. At times there were certain plugins (I am looking at you redirection plugin) been responsible for generating extra loads on the server. Sometimes servers just could not cope with the demand.

Each time we migrated, we considered all options available to us. Like most organisations we struggled to find a hosting solution that has track record of supporting and scaling WordPress platform other than Like many startup ProductiveMuslim also needed to think about the cost of hosting.

Unexpected Migration

I have been a developer for over 15 years now, and never had to touch any production servers. While I almost always developed against developer sandbox optimised for development use. I always had skilled sysadmins do their magic on production servers for me.

When I thought of resolving this scaling issue I thought I would make attempt to solve the scaling problem myself.  I proposed to @AbuProductive to try DigitalOcean. This was the first time I had to learn the black art of sysadmins to manage production servers. Having worked with sandbox meant I was already experienced in managing servers. So I created a test server for testing new features.

About month into using the new test server, the live site went down. This was result of an DDOS attack via vulnerability found in our theme. The theme was bundled with a vulnerable version of TimThumb image resizing script (more on the TimThumb fiasco). It was not easy to recover simply by restarting the server (as we used to do).

Pressure to get the site live quickly meant test server  was no longer a test server. I  configured it into a production server, and site was live soon after. We had few hiccups but managed to get it going.

Being able to see through entire month of Ramadan 2013 (July 2013) with over 135k of unique visitors was evident of incidental success. By no means it was end of the scaling problem. We still had occasional hiccups  with server I could not figure out the root cause of the issue.

Fact of the matter is ProductiveMuslim is growing so fast that it’s now become extremely challenging for volunteer like myself to maintain it. It’s time for another migration.

Rise of Fully Managed WordPress hosting

While we at ProductiveMuslim were struggling with servers, there was another interesting things was happening on the other side of atlantic. A new breed of Fully Managed WordPress Hosting companies have been emerging. Two such companies are WP Engine and Synthesis.

Mid December 2013 we signed up to WP Engine and completed migration on 1st January 2014.

Watch out for the next post for my experience of migrating to WP Engine.

“How strange and foolish is Insaan. He loses his health in gaining wealth. Then to regain health he wastes his wealth. He ruins his present while worrying about his future, but weeps in the future by recalling his past. He lives as though death shall never come to him, but he dies in a way as if he were never born.” – Ali ibn Abu Talib

33 Useful WordPress Plugins Released In The Last Three Months

33 Useful WordPress Plugins Released In The Last Three Months

There is a huge sea of WordPress plugins that released almost every hour throughout the world but only a few are actually useful and give something new besides what other existing plugins are offering. From these few plugins that are new and useful that released in the last three months I hope will make your WordPress experience better and easier.

via Useful WordPress Plugins Released In The Last Three Months.

How do you backup and extract a WordPress site?

How do you backup and extract a WordPress site?

Automattic the company behind WordPress has a solution called VaultPress (

VaultPress provides realtime, continuous backup and synchronization of every post, comment, media file, revision and dash­board setting across at least two separate cloud services in addition to the Automattic grid, ensuring no loss of content. How? Using WordPress hooks to receive alerts when information changes on your site, VaultPress immediately syncs all of
your changes with our servers. The net result? 11 copies of your data,
backed up continuously and in realtime.

Once again its paid service and one that has been highly recommended (in WordPress user group meetings) by those who have been using the service . As for my self I did get an invite to join during the beta/invite only period, however I am yet to use the service for my personal sites.

One can consider other solution mentioned here. However my recommendation is to go with VaultPress for the services it provides beyond just a online backup such as pushing fixes to zero-day security vulnerabilities and monitoring intrusions. VaultPress is brought to you by some of the world’s most experienced WordPress developers, including the team behind

For more reasons see:…

How do you backup and extract a WordPress site?

What is the easiest/best way to add ‘Subscribe to my WordPress blog’ widget on my website?

There are many ways this can be achieved. It’s all depends on how you’d prefer to manage your subscribers and what kind of experience your user will receive. I will try to cover one method here today.

The very simple method: WordPress site Membership

What does that means for you?
No need to install any extra plugins, simple and most easiest way to get up and running.

What does that means for your subscribers?
Your subscribers will get an update via email when you publish new post.


  • You can see/manage all your subscribers on the WordPress Admin Dashboard.


  • No way of knowing if people have read your (email) post or visited your
    website as result. You can address this by using some kind of analytics
    tools. Most website/blogs use Google Analytics. Knowing if subscribers
    read your post would require a bit more complex setup.
  • Can’t do much with the subscribers data straight away.

How to enable Membership in 5 easy step?

  1. Login to your WordPress admin dashboard
  2. Goto “Settings” Menu
  3. Tick Membership check box for Anyone can register
  4. Set New User Default Role to Subscribers
  5. Click the Save Changes button to complete your setup.

What is the easiest/best way to add ‘Subscribe to my WordPress blog’ widget on my website?