How WP decide to show or not to show in admin panel the pop-up window with hint? Need a fix

Dismissed pointers are stored as user meta, you can inspect this for yourself with: $meta = get_user_meta( wp_get_current_user() ); print_r( $meta[‘dismissed_wp_pointers’] ); In your case, the meta might be empty or damaged, to update dismissed pointers for ALL users on your blog, you could run this function (only once): function wpse80084_dismiss_wp_pointers() { $dismissed = array( … Read more

Change taxonomy slug in database

You could just run DELETE FROM wp_terms WHERE slug LIKE “museum-%” on you MySQL server, but that would probably leave some orphan rows in wp_term_taxonomy and potentially in wp_term_relationships if you have used the terms. While being a bit more complicated I would recommend deleting them using the WordPress API. Something like this might work … Read more

How to back-up a database on IIS

I was able to find the name of the database in word-press’s wp-config.php file under the and was able to create a back-up of the file using MSQL workbench and the tutorial found here http://community.discountasp.net/showthread.php?t=11972.

DB access blocked when initializing WP externally

I accidentally stumbled into the answer today when I forgot to turn on my MAMP managed mysql server. At this juncture it pointed me to the critical difference. This answer is phrased for anyone running MAMP but potentially has broader applicability (certainly LAMP, WAMP, etc.); if you’re experiencing the same problem in an non-MAMP environment … Read more

Insert Extra fields added in the front end registration form to DB

Why the downvotes for using user meta? That’s how I do it, I store all the extra profile stuff in wp_usermeta table by utilizing update_user_meta. <?php // first validate all $_POST data $validated = $this->validate_and_sanitize(); $username = $validated[‘uname’]; $password = $validated[‘pass’]; $email = $validated[’email’]; $new_user_id = wp_create_user($username, $password, $email); if ( is_wp_error($new_user_id) && array_key_exists(‘existing_user_login’, $new_user_id->errors)) … Read more

What is best for saving lot of extra detail of user?

You can store multiple pieces of data within a single field by passing an array rather than a string: $user_data = array( ‘favorite_color’ => ‘blue’, ‘favorite_animal’ => ‘cat’, ‘favorite_city’ => ‘paris’ ); update_user_meta( $user_id, ‘user_data’, $user_data ); WordPress will serialize this data for you on save, and unserialize back into an array when it is … Read more

Running WordPress from MySQL Cluster with HAPRoxy

SELinux was contributing to the problem. The main issue was that an HTML page was attempting to talk to another port on the localhost. I would not have seen the problem if the HAProxy was running on a separate host. The log was revealed in /var/log/messages, where I should have checked but did not considering … Read more

Woocommerce: Grab total revenue of a product over all orders

Got it solved. Probably not the most efficient way but it works! SELECT product_id, meta_value FROM ( SELECT order_meta.order_item_id, order_meta.meta_value AS ‘product_id’ FROM wp_woocommerce_order_itemmeta AS order_meta LEFT JOIN wp_woocommerce_order_items AS order_items ON order_meta.order_item_id = order_items.order_item_id LEFT JOIN wp_term_relationships AS term_rels ON term_rels.object_id = order_items.order_id WHERE term_taxonomy_id = 24 AND order_meta.meta_key = ‘_product_id’ ) AS product_ID … Read more

Create hundreds of users with just ID in phpMyAdmin

To change the initial ID user by mysql ALTER TABLE wp_users AUTO_INCREMENT=2; although the number has to start at the next available id with no existing id higher, as in select max(id) from wp_users; https://stackoverflow.com/questions/1485668/how-to-set-initial-value-and-auto-increment-in-mysql