Technology Insights

MySQL Command To Update Just The Matching Part Of A Column

Earlier I set up a development WordPress site that mirrored a live WordPress installation. To do this I dumped the entire WordPress database using mysqldump and then imported it into a new database with mysql. Among other things that needed to be changed I needed to update any links that referenced the live site’s URL with the development site’s URL. Below I provide the command to make such an update to only a matching portion of a column in row located in a MySQL database.

Technology Insights

Disable All WordPress Plugins From MySQL CLI Or PhpMyAdmin

I was creating a mirror copy of one of my WordPress installations recently and needed a way to disable all plugins. During the process of creating the development WordPress mirror there were issues so I needed to disable all WordPress plugins via MySQL since at the time I could not login to the WordPress admin. Below I will describe listing all of the active plugins with one MySQL command and then disabling all of the plugins with another MySQL command.

Technology Insights

Create A New WordPress Admin Page And Add It To The WP Admin Menu

After a recent issue I ran across I decided I needed a way I could view a list of WordPress posts with the most comments so I searched for a simple plugin that would do that. I couldn’t find anything that did specifically what I wanted to though I did find a WordPress plugin called Most Commented that would display a front-end widget with a list of posts with the most comments. After installing it I needed to modify the plugin to display a page in the WordPress admin section located at /wp-admin. Below I will describe how to create a plugin that generates a WordPress admin page and adds a link to the WordPress admin navigation.