Core Management
Manage WordPress core updates, versions, and system maintenance
Core Management
Keep your WordPress installation up-to-date and secure with our comprehensive core management tools.
WordPress Core Updates
Automatic Updates
Enable automatic updates for minor releases and security patches:
// Enable automatic updates in wp-config.php
define('WP_AUTO_UPDATE_CORE', true);
// Or for major versions
define('WP_AUTO_UPDATE_CORE', 'minor');Manual Updates
For full control over the update process:
- Backup First: Always create a backup before updating
- Test Environment: Test updates on staging first
- Update Core: Use the WordPress admin or CLI
- Update Database: Run any required database migrations
- Verify Functionality: Test all site features
Update Types
Minor Updates (Recommended)
- Security Patches: Critical security fixes
- Bug Fixes: Minor bug corrections
- Performance: Small performance improvements
- Compatibility: Plugin and theme compatibility updates
Major Updates
- New Features: Major new functionality
- API Changes: Breaking changes in core APIs
- UI Changes: Significant interface updates
- Database Changes: Major database structure changes
Version Management
Current Version Information
# Check WordPress version
wp core version
# Check for updates
wp core check-update
# View update changelog
wp core get-updatesVersion Rollback
If an update causes issues, rollback to a previous version:
# Download specific version
wp core download --version=6.4.0
# Update database if needed
wp core update-dbCore File Integrity
File Checksum Verification
Verify that WordPress core files haven't been modified:
# Verify core files
wp core verify-checksums
# Check specific version
wp core verify-checksums --version=6.4.0Core File Permissions
Ensure proper file permissions for security:
# Set correct permissions
find /path/to/wordpress -type f -exec chmod 644 {} \;
find /path/to/wordpress -type d -exec chmod 755 {} \;
# Set ownership
chown -R www-data:www-data /path/to/wordpressDatabase Management
Database Optimization
Keep your WordPress database running efficiently:
# Optimize database tables
wp db optimize
# Repair corrupted tables
wp db repair
# Check database size
wp db sizeDatabase Updates
Ensure database is compatible with WordPress version:
# Update database structure
wp core update-db
# Check for required updates
wp core update-db-checkSecurity Hardening
Core Security Settings
// Disable file editing
define('DISALLOW_FILE_EDIT', true);
// Disable plugin/theme installation
define('DISALLOW_FILE_MODS', true);
// Hide WordPress version
remove_action('wp_head', 'wp_generator');
// Disable XML-RPC
add_filter('xmlrpc_enabled', '__return_false');File System Security
- Remove unused themes and plugins
- Update .htaccess with security rules
- Implement proper file permissions
- Enable server-level security features
Performance Optimization
Core Performance Settings
// Enable object caching
define('WP_CACHE', true);
// Memory limits
define('WP_MEMORY_LIMIT', '256M');
define('WP_MAX_MEMORY_LIMIT', '512M');
// Disable post revisions
define('WP_POST_REVISIONS', false);
// Optimize autoload
define('WP_AUTOLOAD', false);Caching Configuration
- Enable page caching
- Configure object cache
- Set up database caching
- Implement CDN integration
Maintenance Mode
Enable Maintenance Mode
// Create .maintenance file
$content = '<?php $upgrading = ' . time() . '; ?>';
file_put_contents('.maintenance', $content);
// Remove when done
unlink('.maintenance');Custom Maintenance Page
Create a custom maintenance page:
// functions.php
function custom_maintenance_mode() {
if (!current_user_can('edit_themes') || !is_user_logged_in()) {
wp_die(
'<h1>Site Under Maintenance</h1>
<p>We\'ll be back soon!</p>',
'Maintenance',
array('response' => 503)
);
}
}
add_action('get_header', 'custom_maintenance_mode');Backup and Recovery
Core Backup Strategy
# Full WordPress backup
wp db export backup.sql
tar -czf wordpress-backup.tar.gz /path/to/wordpress
# Selective backup
wp db export --tables=wp_posts,wp_users backup.sqlRecovery Procedures
- Restore from backup
- Update file permissions
- Clear caches
- Test functionality
- Update DNS if needed
Monitoring and Alerts
Core Health Monitoring
- Version monitoring: Track WordPress versions
- Security scanning: Regular security checks
- Performance monitoring: Track core performance
- Update notifications: Get notified of available updates
Automated Tasks
- Daily backups: Automated backup schedules
- Update checks: Daily update availability checks
- Health reports: Weekly system health reports
- Security scans: Regular malware scanning
Troubleshooting
Common Core Issues
White Screen of Death
- Memory issues: Increase PHP memory limit
- Plugin conflicts: Deactivate problematic plugins
- Theme issues: Switch to default theme
- File corruption: Reinstall WordPress core
Update Failures
- Permission issues: Check file permissions
- Memory limits: Increase PHP memory limits
- Timeout errors: Extend execution time
- Disk space: Ensure sufficient disk space
Database Errors
- Connection issues: Verify database credentials
- Corrupted tables: Repair database tables
- Character encoding: Fix character set issues
- InnoDB issues: Convert tables to InnoDB
Debug Mode
Enable debugging for troubleshooting:
// Enable debugging in wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
// Log errors to file
@ini_set('display_errors', 0);Best Practices
Update Strategy
- Test updates on staging first
- Backup before any updates
- Update during low-traffic hours
- Monitor site after updates
- Have rollback plan ready
Security Practices
- Keep WordPress updated
- Use strong passwords
- Limit admin access
- Regular security scans
- Monitor for suspicious activity
Performance Tips
- Enable caching
- Optimize database
- Use CDN
- Minify assets
- Monitor performance
Keep your WordPress core healthy and secure with our comprehensive management tools.