Tag Archives: Wordpress

Quickly Deactivate or Activate All WordPress Plugins via Database or FTP

WordPress plugin activate deactivate all at once and Quickly

Sometimes during troubleshooting, it’s recommend to deactivate all plugins and activate them one by one and suppose at that time you will not able to login in WordPress admin (wp-admin) or white screen of death. At the same point we need to disable all the plugin or some plugin then in that case, How will you disabled/deactivate all or some plugin manually by the database or using FTP. Some time we need it to do very quickly.
I am sharing with you the technique by which you can quickly disable and (re)enable your entire set of WordPress plugins.


Deactivate All Plugins Using FTP


Navigate to the “/wp-content/” folder. You will see a folder called plugins. Rename the plugins folder to anything like  “plugins-deactivate”. Once you do this, all of your plugins will be deactivated automatically.


There may be due to some issue with plugin and it locked out your admin panel. If the issue was with your plugin, you should be able login to your “/wp-admin/” after deactivating the plugin. Once you do that, go back to your /wp-content/ directory and rename “plugins-deactivate” back to plugins. You can troubleshoot the problem by activating plugin one by one until your site breaks again.



Deactivate all plugins using phpMyAdmin


Login to your database using with phpMyAdmin and then have a backup.
I always suggest you to take Backup before doing any updates in table directly, so please in first step take backup of your database.
If you have backup of your database, you can quickly restore that and can revert your changes, so in this case(if there will some accident) you will always in safe hands.


Now, search a row in “wp_options” table that have “option_name” as “active_plugins”. Use the following SQL query (update your Database table prefix “wp_” if needed) for doing the same job.


SELECT * FROM wp_options WHERE option_name = ‘active_plugins’;


Once you found active_plugins column, click to edit it. You will see something like the below, depends on the number and type of plugins you have installed:




This is a serialized array, you can unserialize this array by simply using the tool “http://www.functions-online.com/unserialize.html“. Copy the above string and click on run button you will get an array that represents every activated plugin on your site.


Thus, to quickly disable all plugins without using the wp-admin is cut the serialize array string as we have seen above and paste it into a safe notepad (text) file. After removing the code, click the button to save your changes and that’s it. All WordPress plugins are now deactivated (although you have all the plugins files in the same place “wp-content/plugins” and you can activate the plugin whenever you want by wp-admin area- if found working). This above method is obviously handy during, when the situation is critical and time-sensitive. Once you are ready to re-enable your entire set of plugins, simply copy & paste the preserved code(serialized array string) by notepad file and put it in the “active_plugins” field. Click save and done.


If you want to activate only some of those, unserialize the array by the above tool and make the array of plugins you want to activate then serialize that and put the string in the “activate_plugins” columns.


You can also go with a very simple SQL query to disable all plugins in one second.

UPDATE wp_options SET option_value = ” WHERE option_name = ‘active_plugins’;



This method works only for WordPress older versions(2.9 or older) for later use the below.

UPDATE wp_options SET option_value = ‘a:0:{}’ WHERE option_name = ‘active_plugins’;

How to move your wordpress site to a new domain – easy wordpress migration

WordPress stores the URL in his database, one of my colleague is new bie for WordPress.He has developed a new WordPress site and client has given all the data to him.After making the full site ready, he get stuck that four most important tables have URL in it, so should all the data need to re-enter by WordPress admin.


I know most of the WordPress newbie think like this, but it can be done by below eight very simple queries (in the case if you have not installed any large plugins)


What you need to done is just replace
@[email protected] and @[email protected] as per your website and run these query.


UPDATE wp_options SET option_value = REPLACE (option_value, “@[email protected]”, “@[email protected]”) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;


UPDATE wp_posts SET guid = REPLACE (guid, “@[email protected]”, “@[email protected]”);


UPDATE wp_posts SET post_content = REPLACE (post_content, “@[email protected]”, “@[email protected]”);


UPDATE wp_posts SET post_content = REPLACE (post_content, CONCAT(‘src=”‘, “@[email protected]”), CONCAT(‘src=”‘, “@[email protected]”));


UPDATE wp_posts SET guid = REPLACE (guid, “@[email protected]”, “@[email protected]”) WHERE post_type = ‘attachment’;


UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, “@[email protected]”, “@[email protected]”);


UPDATE wp_links SET link_url= REPLACE (link_url, “@[email protected]”, “@[email protected]”);


UPDATE wp_links SET link_image = REPLACE (link_image, “@[email protected]”, “@[email protected]”);


Now move your WordPress site to a new domain is very simple, isn’t it!!

If you still face any issue, post your comments.

Some Essentials WordPress Plugin every WordPress site owner should install

Some Essentials WordPress Plugin every WordPress site owner should install.


Better optimized theme

You should choose the theme as per your website is made for. If your website is a shopping cart then it should be attractive.
If it is just for blogging then it should be very simple and easy to load, so whenever the website owner starts with WordPress, he should choose the theme very carefully and according to your website needs.


There are many WordPress theme available for Free and Paid.



301 Redirect

In WordPress permalinks, for make your site better in search engine you have to select the proper permalinks for URL.
Suppose you have selected a structure (permalink) for URL, and after sometime you found it not appropriate for your site and SEO.
Or you have found that the POST or PAGE title is not as good for SEO and therefore you need to update that, then it will create a problem for Search Engine Webmaster Tools.


The problem is that the URL (old one) is already crawled by Search engines and it will take time to crawl the website again by the search engine.
During this period, if users come to your site using search engine and click on that URL then it will redirect the user to 404 page of your website.
I think no webmaster like this.


So for that we have a solution called as 301 redirect(permanent) redirect of the old url to new url, we can do the same using .htaccess Tricks.
For making or easing the same we have a very simple plugin called as 301 redirect, according to me every website owner who use WordPress should install this, this will automatically do this job for you.


WordPress SEO plugin by Yoast

SEO is a very vast field in web technology, the main concern of SEO is to make the site optimized and popular so that search engines will prioritize your website URL to display it first.


Yoast always proved his superiority in SEO, and they have developed a very good and nice SEO plugin for WordPress, it helps the website owner a lot to optimize and increase the traffic on the site.


W3 Total Cache

If your website have a lot of images or content and js and css files, then it will slow down your website to load on browser, i.e. your page speed will slow down. There are lot of technique that can be used as the js and css minified. Cache the content and images, so that it will help the browser to load the page speedily.

The ‘W3 Total Cache’ plugin will help you to speed up the pages loading time.


Captcha and Contact Form 7

As if your website will popular and people will want to contact with you, for that you need some type of form for contacting?
Contact Form 7 is very easy to use and customizable according to your theme.


Share Buttons for Twitter, Facebook, Google+ & more

In today’s world we know how much people and how many times they use social networking website, so to make your website popular, you should add social networking links. That can be used by the user to share the articles. It will help to make your website popular as almost all the guys use internet have some social website account.


If you like this article, I have also given the links for sharing this, so click on those to share this with your friends.
Below WordPress plugin is there to fulfilling the same job in very easy manner.


Facebook fan Page

Facebook fan page increase your website subscribers.
and your website popularity and traffic will increase rapidly.

You can use the below WordPress plugin for the same, it will prove very helpful.



Google Custom Search

Google custom search improve the search functionality in your website as you all know how powerful Google is.
So if you add Google custom search in your website then it will handle the search functionality of your site very easily and very fast i.e. the result will display very fast.


It fetches the result from its database i.e. it show the related indexed pages from Google database of your website.
However it is very easy to integrate, but it is more simpler by using the WordPress plugin , if you are using WordPress.
Use the below WordPress plugin, to add Google custom search in your website.




A dynamic website is totally depends on its database. Optimized databases always help in speeding up the page load time and optimize the site.
The Database of your website should be safe, so for that you should take backup of your database at a regular interval, so if your website faced some malicious threat attach then you can recover by the backups files and database.

The below WP-DBManager WordPress plugin have almost all the functionality related to the database.
According to me every webmaster should install this plugin to optimize the database and backups.



Feedburner Email Subscription

Email subscription is the way by which the user can register for your website and will get all the update related to new post added, update or deleted.

Google Feedburner Tool helps a lot in this and provides a very good functionality related to this.
For implement this Google Feedburner helps and guides to integrate this in your website.
If you are using WordPress then you can use the Feedburner Email Subscription plugin and can enjoy the great functionality it have.
I have also integrated this in my website, If you want to subscribe for my website updates Go to left sidebar and enter your email in the box and submit.



Better WP Security

WordPress Open source CMS is used by very large number of users, so the way of coding in WordPress and functions URL can be easily known to the hackers.
So you should aware, if you are using WordPress in your website.
Like wordpress admin access URL is usually wp-admin.


Mostly the admin user id is 1 and username is admin, username can also be known easily using the login form submission using wrong password.
Generally the table prefix is wp_.
.htacces, wp-config (file where the main site configurations present) read/write permission and so on.


To protect your website from these all, you should install Better WP Security plugin in your WordPress site admin.
Please take care before installation as it takes effect and update core and server configuration files.
So take backups of files and database before installation and activation of plugin.
If have just installed WordPress then you can install and make active without any head-ache but if your website is in running stage and you have lot of content then you should take care in each and every step of activation, every single step can make your website in unstable state, so be careful.



These WordPress plugins are essentials, i.e. every master should install these in his website.


These will help to make popular your website, increase the web traffic and optimize your website.
Let me know if you face any issue related to above WordPress Plugin.



Share your WordPress page URL on social networking website by using a simple function

Share your WordPress post on facebook & other social networking website.


If you want to share your WordPress page URL on social networking website, it’s very simple to do.

Just place this function in your functions.php file, and call the function where do you want it to show.



function GetShareLinks() {

/* Your current page URL */
$URI = get_permalink();

/* The js script used for goolge plus share button */
$sharestring ='<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>’;

$sharestring .='<a href="https://pinterest.com/scriptarticle/" target="_blank"><img width="16" height="16" alt="Follow Me on Pinterest" src="http://passets-lt.pinterest.com/images/about/buttons/small-p-button.png"></a>
<a href="http://www.facebook.com/sharer.php?u=’.$URI.’"><img src="’.get_bloginfo(‘template_url’).’/images/facebook.jpg" alt="" /></a>
<a href="http://twitter.com/intent/tweet?text=’.$URI.’"><img src="’.get_bloginfo(‘template_url’).’/images/twitter.jpg" alt="" /></a>
<a href="http://www.linkedin.com/shareArticle?mini=true&url=’.$URI.’"><img src="’.get_bloginfo(‘template_url’).’/images/in.jpg" alt="" /></a>
<g:plusone count="false" size="small"></g:plusone>’;

return $sharestring;




You can also use this function in other website (non WordPress) site, you have to just replace the get_permalink() function by current page URL and update the social icons images path.


If you face any issue to use this, put your comment, I’ll help you 🙂


Display Recent Blog Posts Outside WordPress

Generally web master uses the WordPress for applying blog on their website.


Below is the code for the getting recent/latest post or list, can be applied to display recent posts outside anywhere in your WordPress website.


The key to use WordPress outside is include the wp-load.php file
Once the wp-load.php file is included, the entire wealth of WordPress functions will available for you to use.
This can be found under the root folder.


require_once ‘wp-load.php’;

// Recent 10 posts
$recent_posts = wp_get_recent_posts(array(‘numberposts’ => 10));

// Apply your design/html
echo ‘<ul>’;
foreach($recent_posts as $post) {
echo ‘<li><a href="’, get_permalink($post[‘ID’]), ‘">’, $post[‘post_title’], ‘</a></li>’;
echo ‘</ul>’;


If you want to pass more argument, you can do, below is the WordPress reference URL for wp_get_recent_posts function


You can also do your own custom queries with WP_Query.


Get a separate RSS feed for custom post type WordPress

rss feed for custom post type

Everyone is utilizing custom post types in their new WordPress sites as it is a very powerful and popular feature now days, now the next one is make a separate RSS feed for custom post type?


How can a user create a separate RSS feed for a specific custom post type in WordPress?


It’s so simple,it works just like creating a separate RSS feed for each category in WordPress.


You can simply go by typing this URL.




Just change the post_type name to the one that you want to create a separate RSS feed for.

Are you looking to take it to the next level and make it for a specific custom post type and custom taxonomy? Well that is also not so hard at all.




Here genre would be the custom taxonomy, and new york would be the tag if you may call it that.
You can create a button in your site sidebar to link to that.You can also link this feed and create a separate feed burner feed for it.


For grabbing most popular WordPress custom post type plug-in,click on below URL.