Common Postgres Tasks on CentOS 7

Reading Time: 4 minutesThis guide walks you through some common tasks surrounding a Postgres server. In this tutorial, we’ll cover installing Postgres, creating new databases and users, backing up databases, and more! Let’s dig in! Continue reading “Common Postgres Tasks on CentOS 7”

How to Backup, Delete and Restore a PostgreSQL Database in CentOS 7 or Ubuntu 16

Reading Time: 5 minutes

Table of Contents

Listing databases Dump a database Dumping all databases Dump Grants Delete or Drop a Database Delete a Grant Restore a Database Restore Grant Continue reading “How to Backup, Delete and Restore a PostgreSQL Database in CentOS 7 or Ubuntu 16”

Rollback a Plugin or Theme Using WP-CLI

Reading Time: 2 minutesWP-CLI makes it very easy to rollback plugins and themes as well as update plugins and themes on sites all from command line. This is useful if you see your site is broken by a newer version of the theme or plugin. In this article, we’ll be running through some valuable commands for rolling back your site. If you need to rollback a plugin on a site to a previous version, you can find the previous version number from the development tab of the plugins listed on WordPress.org. To find the slug of the plugin, you will need to go to the WordPress.org plugins. In the case of Contact Form 7, the plugin slug is contact-form-7.
Note:
You can also find the plugin or theme slug by going to your WordPress files and typing in: wp plugin list wp theme list
Pre-flight

Rollback a Plugin to a Previous Version

If you need to test that the command is correct, you can always use the flag –dry-run at the end of the command: wp plugin update contact-form-7 --version=5.0.5 --dry-run In the following example, to rollback Contact Form 7, you can use this command: wp plugin update contact-form-7 --version=5.0.5  

Activate A Particular Version of a Plugin

If you need to install and activate a previous version of a plugin, run: wp plugin install contact-form-7 --version=5.0.5 --activate --force  

Update All Plugins

If the plugins you updated have been fixed and you now need to update all plugins, the example command is: wp plugin update --all Excluding A Plugin If you want to update all plugins, but need to exclude a specific plugin (in this case WooCommerce), run command: wp plugin update --all --exclude=woocommerce  

Rollback a Theme to a Previous Version

If you did need to rollback a parent theme to a previous version, you could use this command example which would rollback the Storefront theme to version 2.4.0: wp theme update storefront --version=2.4.0  

Update Theme to Current Version Release

If you know wanted to update the Storefront theme on a site to the most current version, you could use this command example; wp theme update storefront   Using a mix of these WP-CLI commands will enable you to easily rollback a plugin on your site, rollback a theme, or update all plugins. It will also update all plugins, but exclude a specific plugin from being updated.  Our Managed WordPress product comes with WP-CLI installed along with easy, automatic updates.  Check out how our Managed WordPress platform can streamline your work today!

Proactive Server Maintenance Checklist, Prior to Reboot

Reading Time: < 1 minute
Take a Backup, or Be Sure Backups are Running
We have tutorials on How to Create a Storm Server Backup, and How to Restore a Storm Server Backup.
Check Running Processes
Liquid Web’s Heroic Support team closely monitors the load on your servers with Sonar® proactive monitoring and service restoration. That said, it’s always wise to glance at what processes are running on your server to assure your services are running as expected. Check-out our tutorial on Monitoring Server Processes with Top for Linux.
Verify Services Will Start at Boot
Be sure to verify that all of your necessary services are configured to start when the server boots up. For CentOS users, you can follow this tutorial: chkconfig Command Examples for Red Hat and CentOS.
Save, Save, and Save Some More
Always check whether or not there are any unsaved changes to configuration files, etc. prior to a reboot. Save early and safe often! Continue reading “Proactive Server Maintenance Checklist, Prior to Reboot”