Why my wp_posts data is so huge?

No, that isn’t normal for 23 posts. Note that “posts” is pretty wide concept in modern WordPress. Many things are posts without being obvious as such, for example parts of navigation menus. While 60k entries does sound excessive for a small site, there is no telling without examining actual data to determine which post types … Read more

How to transfer one domain to another domain without losing theme options (customizer)?

You can not replace the URL in the database using ctrl+f or any other “direct” method. You have to do a search & replace in the whole database in a way capable of keeping the validity of serialized data. There are several tools to do that serialized seach & replace. For example: Plugins like Better … Read more

Get posts and include taxonomy term

You should be using get_the_terms(). wp_get_post_terms() queries the db to get post term info, where as get_the_terms() returns the post term objects directly from the post term cache and only queries the db if that info is not available. By default, all post’s terms are cached by the query being executed. EDIT I cannot comment … Read more

WooCommerce: remove sample & dummy data

Even though it’s dummy data, there is nothing special about it compared to actual data other than the fact that it’s all made up for testing purposes. I assume that you only imported dummy data for testing and not actual data. If so, I’d recommend that you manually delete the dummy data through WordPress.

Strange characters added to the database

The strange characters you are referring to are part of the table prefix. This is configured with the variable $table_prefix in the file wp-config.php. $table_prefix = ‘wp_’; When migrating a WordPress installation and setting up a new wp-config.php file you have to make sure, the prefix stays exactly the same as in the former config … Read more

dbDelta not adding additional columns in plugin database update

After trial and error, here is the code that works: function installer(){ include(‘installer.php’); } register_activation_hook( __file__, ‘installer’ ); //executes installer php when installing plugin to create new database //database update checkdate function myplugin_update_db_check() { global $xenon_result_db_version; if ( get_option( ‘xenon_result_db_version’ ) != $xenon_result_db_version ) { installer(); } } add_action( ‘plugins_loaded’, ‘myplugin_update_db_check’ ); The installer.php looks … Read more