Managing WordPress sites securely and efficiently is now easier with cPFence's WordPress management tools. These features allow you to bulk update or enable/disable automatic updates for WordPress core, plugins, and themes across your server. Below is a step-by-step guide to set up and use these features.
Step 1: Generate a List of WordPress Sites
-
Start by generating a list of all WordPress sites on your server using the following command:
cpfence --generate-wp-sites-list
The list will be saved in
/var/log/cpfenceav/wp-sites-list.txt
. You can review and edit this file to exclude sites where you don’t want updates applied.
Step 2: Perform Bulk WordPress Updates
-
Bulk Update All Sites:
Use the following command to update WordPress core, plugins, themes, and translations on all sites in your list:cpfence --bulk-update-wordpress
This command updates all listed WordPress installations and performs post-update verification for each site. Here’s what it does:
- Automatically checks if the site is loading correctly after updates.
- Resolves common issues like stuck
.maintenance
files to bring sites back online. - Logs all updates and errors, providing detailed insights for review.
Step 3: Enable Auto-Updates
-
Enable Auto-Updates for All Sites:
To configure automatic updates for WordPress core, plugins, and themes, use this command:cpfence --enable-wp-auto-updates
This ensures all future updates are applied automatically to maintain site security.
Step 4: Disable Auto-Updates (Optional)
-
Disable Auto-Updates for Certain Sites:
If you need to disable auto-updates for older or customized sites, use this command:cpfence --disable-wp-auto-updates
This gives you control over when and how updates are applied to specific installations.
Step 5: Monitor Vulnerabilities
-
Export a Vulnerability Scan Report:
Generate a detailed report of vulnerabilities in WordPress core, plugins, and themes for further analysis:cpfence --vuln-export
This report is saved in CSV format and provides valuable insights into potential issues that need attention.
Key Benefits of Bulk Updates
- Time Savings: Update dozens or hundreds of WordPress sites in minutes instead of hours.
- Post-Update Verification: Ensures sites are functioning properly after updates, reducing the risk of downtime or errors.
- Error Handling: Automatically resolves common issues like stuck
.maintenance
files. - Detailed Logging: Keeps a record of all actions, including successes and errors, for easy troubleshooting.
When to Use Auto-Updates ?
- Recommended for: Up-to-date sites using compatible plugins and themes, ensuring quick security updates and saving time.
- Not Recommended for: Sites with outdated or custom themes/plugins that may cause compatibility issues.
For older or customized sites, we recommend manual updates to avoid potential problems. Use the WordPress Cleaning Guide to address issues and prepare your sites for auto-updates.
Need Further Assistance?
If you have questions or need help with WordPress updates, please contact our support team via the client portal.