Now WordPress have 55 thousands of plugins

WordPress now have 55 thousands of plugins in plugin repository.

We can browse the plugins by 4 categories:

How to Quick Fix Error Another update is currently in progress.

Some times while updating the WordPress core or bulk updating plugins we’ll get a notice:

Another update is currently in progress.

This notice occurs because WordPress lock the update process if the update process triggers multiple times.

The update class uses the method create_lock of the class WP_Upgrader to create a lock. E.g. WP_Upgrader::create_lock( 'LOCK_NAME', 'LOCK_TIME' );

Now there are two locks:

  • core_updater
  • auto_updater

Lock core_updater

Lock to prevent multiple Core Updates occurring. Its release time is

15 * MINUTE_IN_SECONDS

It means that it takes 15 * 60 (seconds) = 900 seconds. Its 15 minutes.

To release lock you need to use the function WP_Upgrader::release_lock( 'core_updater' );

OR, Simply delete the below option to release the lock.

delete_option( 'core_updater.lock' )


Lock auto_updater

Its release time is HOUR_IN_SECONDS (1 Hour). Its default release time.

To release lock you need to use the function WP_Upgrader::release_lock( 'auto_updater' );

OR, Simply delete the below option to release the lock.

delete_option( 'auto_updater.lock' )

Get all posts which contain specific shortcode

While working on some project, I was stuck on one issue.

The issue was, User was multiple posts and he was use my shortcode on some of them.

And I was trying to figure out which are the posts which content have my shortcode.


The answer is in my question. To do this I need to search the shortcode from all the post content.

To achieve this I have used SELECT query. E.g.

My shortcode was something like myshortcode (Not exactly this shortcode, I have use this shortcode for example purpose.)

Example 1: Search shortcode myshortcodein all the posts. (Including posts, pages, custom post types)

global $wpdb;
$ids = $wpdb->get_row("SELECT ID FROM {$wpdb->postmeta} WHERE meta_value LIKE '%myshortcode%'", ARRAY_A);

// print_r( $ids ); // Print all the IDs.

Above SELECT query return the array of IDs of all the posts, pages, custom post types which post content contain myshortcode.


Example 2: Search shortcode myshortcode ONLY in PAGES.

global $wpdb;
$ids = $wpdb->get_row("SELECT ID FROM {$wpdb->posts} WHERE post_content LIKE '%[myshortcode AND post_type='page'", ARRAY_A);

// print_r( $ids ); // Print all the IDs.