add_post_meta does not respect the content

Why the content is not being respected And it’s not just add_post_meta(), but any functions like add_term_meta() and add_user_meta() that uses add_metadata(). And the reason why the value gets serialized again is because add_metadata() will automatically serialize the meta value using maybe_serialize() which (unfortunately) will serialize the value even if it’s already serialized. How to … Read more

SQL Query to Update Admin Email

While your SQL query will probably do the trick, you don’t need to interface directly with the database to accomplish this. The preferred methods would by using WordPress’ update_option() function or by running the WP-CLI command:wp option update. Via update_option() To override the admin email change confirmation process, add the following to your functions.php file … Read more

WP Optimization: Removing Orphaned wp_options (especially the autoload ones)

Do you have access to a SQL client program like phpmyadmin or something similar? If so give this query SELECT option_id, option_name, LENGTH(option_value) FROM wp_options WHERE autoload = ‘yes’ AND option_name NOT LIKE ‘_transient%’ ORDER BY 3 DESC LIMIT 20; You’ll see the top twenty auto loaded options in descending order of length. Eyeball the … Read more

Critical error in final stage of website launch – URLs are BROKEN!

Posting as an answer from the @OneTrickPony comment above: Verify that mod_rewrite is enabled on your server. Assuming that mod_rewrite is enabled, ensure that the root WordPress install directory is WordPress-writeable, or that, if it exists, the .htaccess file in the root WordPress install directory is WordPress-writeable. (See file permission scheme for WordPress, and Hardening … Read more

In what part of the WordPress core does the users table and usermeta table get joined?

I’m not 100% what you are asking, it seems like several questions? But here goes: $meta_value = get_user_meta($user_id, $key, $single); For example: $first_name = get_user_meta($user_id, ‘first_name’, true); As for adding hooks I think this answer might be what you are looking for? How To Add Custom Form Fields To The User Profile Page? UPDATE Based … Read more

What is this in my tables

It’s definitely from a plugin, unless you gave your WordPress install a prefix of “atpp_”. Assuming you do not have the plugin active, you can safely remove it.