Is there a shortcut to change bulk BMP images to JPG images in a site?

Assuming you add the files with the matching filenames in the appropriate wp-content/uploads/ folders you could run a few SQL queries to update the WordPress database to use the .jpg files. Assuming your wpdb prefix is wp these queries would be: UPDATE wp_posts SET post_mime_type = replace(post_mime_type, ‘image/bmp’,’image/jpeg’); UPDATE wp_posts SET guid = replace(guid, ‘.bmp’,’.jpg’); … Read more

What is the purpose of storing `siteurl` in database?

Since you mention multiple environments you can manually define the site URL within your wp-config.php file define(‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/path/to/wordpress’); define(‘WP_HOME’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/path/to/wordpress’); Keep in mind that it will override what you have set in your options table. As detailed in the documentation: Setting this value in wp-config.php overrides the … Read more

Subscribers to posts

If for “all the conversations a user is in” you mean “all the conversations where a user has commented” you dont need any additional table, just a SQL to get all the posts of conversation CPT where an user commented. Here a function that should do the trick: /** * Get posts (of a given … Read more

How does WordPress store data?

I have looked inside WordPress database. Never do that unless you need to have an external utility to be able to read data from the DB. For wordpress development always use the proper API for what you need, there was a lot of time invested into making the APIs efficient and there is no need … Read more