Error establishing a database connection,

Maybe if you configured the wp-config.php file like the documentation says (see https://wordpress.org/support/article/editing-wp-config-php/ ) Sample wp-config.php file (database section), per the above link: // ** MySQL settings – You can get this info from your web host ** // /** The name of the database for WordPress */ define( ‘DB_NAME’, ‘database_name_here’ ); /** MySQL database … Read more

Any risk to changing WP table col CHARACTER_MAXIMUM_LENGTH?

The post_type field is an internal feld, you shouldn’t be giving it values that require longer column lengths, and there’s no need for it to be user facing. WP allows you to override everything about it, from the query variable name, rewrite rules, to the wording displayed. But more importantly, you shouldn’t modify WP core. … Read more

In which format the data is stored in WordPress Databases?

That’s not JSON, it’s serialised PHP data. If you try to store a value that isn’t a primitive string/number, such as an object or array, WordPress serializes it using PHP. How do we decode this structure deserialize( … ); However, I do not recommend relying on this for practical and security reasons. Don’t store structured … Read more

Will there be any concern if I upgrade my current WordPress Database server from Centos 7 Mariadb 5.5 to Centos 8 Mariadb 10.3?

WordPress is unaware of what kind of database server you’re using, as long as it accepts MySQL flavour SQL, can be communicated with via the mysqli PHP extension, and supports the feature set of the minimum requirements, WordPress is happy. As a result, none of the concerns you need to worry about are related to … Read more

Upload media only to DB

Yes, out of the box WordPress stores images and other uploads only as files. Although it could be, theoretically, possible to change this behavior by tapping inton wp_handle_upload() or _wp_handle_upload() and related functions, I think it would be too complex and unreliable. Besides,I think it wouldn’t be a good idea for performance reasons in case … Read more

Two prefixes in database? Which one is valid?

Check the wp_config.php file… look for a line that reads: $table_prefix = ‘qfo_’; Or… $table_prefix = ‘wpax_’; Which ever one is set in wp_config.php is the one that your WordPress site is using. If the tables aren’t being used then they’re not really doing any harm other than taking up space, but once you’re sure … Read more

Is There Any Built In WP Functionality For Combining Form Fields To Return Specific Data

You can do this with basic input fields and the URL. This is because example.com/?s=test is a search URL for “test”, but example.com/category/foo/?s=test also works, and searches the foo category. Likewise, most of the other parameters WP_Query takes also work, e.g. post_type. If we dig a bit deeper, all the pretty permalinks, and WP rewrite … Read more

WPDB: Update table

Now I have learned that the way I change the database is not safe regarding SQL injection. So I wonder where/how did you learn that? And other than that you should check if those two POST variables are actually set, your toggle_status() code looks fine to me, and $wpdb->update() is an easy way to update … Read more