Bulk action hook for admin pages which uses WP_List_Table

You have to use “process_bulk_action” function like this: public function process_bulk_action() { //nonce validations,etc $action = $this->current_action(); switch ( $action ) { case ‘export_action’: // Do whatever you want wp_redirect( esc_url( add_query_arg() ) ); break; default: // do nothing or something else return; break; } return; } } If you need a complete example this … Read more

Updating User Meta with SQL Query

How can I write a bulk MySQL command to add in the value wp_capabilites=”a:1:{s:10:”subscriber”;b:1;}” into each user_id except 1, 2 and 3 ie. the newly imported users? You don’t. That is a serialized array which is a PHP construct. MySQL has no idea what to do with it. To the database, it is just an … Read more

WXR import problem — not including categories

Maybe this is the answer: http://mansurovs.com/tech/wordpress-does-not-import-categories-and-tags (from there) : Make sure not to delete the original “Hello World!” post that gets automatically created by WordPress. If you have already deleted it, create a new dummy post that you can later delete. Make sure that the WordPress import process is successfully finished. After all posts and … Read more

Stress testing WordPress

WordPress should behave the same, only dependent on your server resources. I hope you have a dedicated server because if not then you will experience severe outages and possibly cancellation of your hosting service. WordPress is merely databases and PHP, so amount of files will not affect its use. It is stable. You could have … Read more

Best way to import users, post and categories from an external database

Unless there is a core WordPress import filter available for your CMS ( see http://codex.wordpress.org/Importing_Content ) or a plugin for a CMS not covered by core WP ( see http://wordpress.org/extend/plugins/search.php?q=import ), or a Google search for your database schema doesn’t reveal anything, you need to roll your own importer. The best way is to write … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)