How do I configure WordPress to talk to a Microsoft SQL Server database?

I think there is a new approach to it: https://blogs.msdn.microsoft.com/brian_swan/2010/05/12/running-wordpress-on-sql-server/ You can also use a 3rd party version of WordPress (not my cup of tea, by the way): https://code.google.com/archive/p/wordpress-mssql/ https://github.com/ProjectNami/projectnami Or follow this guide, but it might be a bit old: https://blog.building-blocks.com/installing-wordpress-on-windows-using-sql-server-2008-r2-part-1/ In the end I think the first link would be the best approach. … Read more

Syncing production with staging

If you are using Pantheon for hosting it turns out to be trivial to do this as a test (they call it dev), stage (they call it test) and production server are built into their platform along with tools to manage moving data and files around. Plus with Pantheon you get easy but optional Git … Read more

WordPress error – PHP Fatal error: Uncaught Error: Call to undefined function register_block_type_from_metadata()

What comes to my mind is that You should check Your wp-settings.php file, as it should include wp-includes/blocks.php file where “register_block_type_from_metadata” function is defined check that file for this line of code: require ABSPATH . WPINC . ‘/blocks.php’; if its not there, then Your wordpress installation could have been either hacked or interupted while updating … Read more

Adding Visibility Options

I’ve actually done this before with a custom page template rather than with the visibility options … because both logged in and not logged in users ended up going to the same page. Here’s some pseudo-code (i.e. do not actually use the code, but it will give you an idea) $logged_in = is_user_logged_in(); switch($logged_in) { … Read more

Environment Specific Options Token

See the filter reference on the codex. In particular, note that you can use the form option_$foo to filter just a specific option key. So if you wanted a filter specific to the siteurl option, you could do: add_filter( ‘option_siteurl’, ‘my_url_filter’ );

Cannot strip JW Player shortcode?

JW Player Plugin for WordPress does not register its shortcode like all other shortcodes, so strip_shortcodes() will not know about it and not strip it. In the code there is a note that this is because it uses argument names with a . in it, and WordPress does not support this. There are probably multiple … Read more