WordPress
Install, secure, update and troubleshoot WordPress.
How to Fix Database Connection Errors in WordPress
This is the most common WordPress error. It means WordPress cannot connect to the MySQL database that stores all your content, settings, and user accounts. The causes range from corrupted databases to incorrect credentials. What This Error Looks Like Your website shows: Error establishing a database connection instead of your normal homepage. The WordPress admin area also shows the same error. Fix 1: Check Your Database Credentials 1. Open Plesk โ Files. 2. Navigate to your WordPress installation directory (usually public_html). 3. Find and edit the wp-config.php file. 4. Look for these lines: define( 'DB_NAME', 'database_name' ); define( 'DB_USER', 'username' ); define( 'DB_PASSWORD', 'password' ); define( 'DB_HOST', 'localhost' ); 5. Verify these match your actual database details in Plesk โ Databases. 6. If any are incorrect, update them and save the file. Fix 2: Repair the Database 1. Go to Plesk โ Databases. 2. Scroll to Modify Databases. 3. Select your WordPress database from the dropdown. 4. Click Repair Database. 5. Try loading your website again. Fix 3: Check for Corrupt Tables 1. Go to Plesk โ Databases โ phpMyAdmin. 2. Select your WordPress database. 3. Look for tables marked with "in use" or showing errors. 4. Select all tables, and from the dropdown select Repair table. Fix 4: Check if the Database Server Is Down 1. Go to Plesk โ Databases. 2. Check if you can see your databases listed. If the page is blank or shows an error, the database server may be temporarily down. 3. Contact support to check the server status. Fix 5: Check Disk Space 1. Go to Plesk โ Websites & Domains and check the disk usage shown for the subscription. 2. If your account is at 100% disk usage, the database cannot write new data. 3. Free up space by deleting unnecessary files, old backups, or large logs. Important Notes - Always back up your database before attempting repairs. Go to Plesk โ Databases โ Export Dump. - Never edit wp-config.php without knowing what you are doing โ a typo can make things worse. - This error can also be caused by too many connections to the database (traffic spike). This is a server-side issue โ contact support. Troubleshooting - Error persists after all fixes: The issue may be server-side. The MySQL service may need to be restarted. Submit a ticket with your Plesk username and domain name. - Website works intermittently: This usually means the database server is overloaded. It resolves on its own during low-traffic periods. If persistent, contact support about database performance. - Error started after a plugin/theme update: A plugin may have corrupted the database. Try renaming the wp-content/plugins folder via File Manager to disable all plugins, then re-enable them one by one. - Error only appears on some pages: The specific table that page uses may be corrupted. Use phpMyAdmin to check for broken tables and repair them. - Cannot access phpMyAdmin either: The MySQL server is likely down. Contact support immediately โ this affects all accounts on the server. Need help? Contact our support team. Related Guides - Fix the white screen - Fix 404 errors - Restore from backup
How to Update WordPress, Plugins and Themes Safely
Keeping your WordPress site, plugins, and themes up to date is essential for security and performance. However, updates can sometimes break your site if not done carefully. This guide explains how to update everything safely using best practices that minimize risk. Before Updating: Create a Backup Always back up your site before performing any updates. 1. In Plesk, go to Websites & Domains โ Backup Manager. 2. Click Download a Full Account Backup to back up your entire hosting account (recommended). 3. Alternatively, download a MySQL database backup from the Download a MySQL Database Backup section. 4. Store the backup file in a safe location on your computer. The Recommended Update Order Follow this order to minimize compatibility issues: 1. Plugins first โ Update one plugin at a time, test after each update. 2. Themes second โ Update the parent theme first, then child themes. 3. WordPress core last โ Update after plugins and themes are compatible. Updating Plugins 1. Log in to your WordPress Dashboard (yourdomain.com/wp-admin). 2. Go to Plugins โ Installed Plugins. 3. Look for plugins with an "Update Now" link below their description. 4. Click Update Now on one plugin. 5. Wait for the update to complete, then test your website โ visit several pages and check that everything works. 6. Repeat for the next plugin. Or update from the Updates page: 1. Go to Dashboard โ Updates. 2. Select individual plugins or use Select All โ Update Plugins. 3. For maximum safety, update one at a time rather than all at once. Updating Themes 1. Go to Appearance โ Themes. 2. Find themes with an update badge. 3. Click Theme Details โ Update Now. 4. After updating, check your website layout and functionality. Updating WordPress Core 1. Go to Dashboard โ Updates. 2. If a new WordPress version is available, click Update Now. 3. Wait for the update to finish. Your site will briefly enter maintenance mode. 4. After updating, visit your site and check all functionality. Enabling Automatic Updates You can enable auto-updates for WordPress core, plugins, and themes: - WordPress core: Go to Dashboard โ Updates โ Enable automatic updates for all new versions. - Plugins: Go to Plugins โ Installed Plugins โ Click Enable auto-updates next to any plugin. - Themes: Go to Appearance โ Themes โ Click Theme Details โ Enable auto-updates. What to Do If an Update Breaks Your Site 1. Restore from backup: Use the Plesk Backup Manager or your backup plugin to restore the previous version. 2. Deactivate plugins: If you suspect a plugin conflict, rename the wp-content/plugins folder via File Manager to disable all plugins, then rename it back and reactivate one by one. 3. Check for compatibility: Visit the plugin or theme page on WordPress.org to check compatibility with your WordPress version. Important Notes - Never update all plugins at once on a production site. Update one by one and test after each. - If your theme uses a child theme, always update the parent theme first. - Plugins that are deactivated but still installed can still be a security risk. Delete unused plugins entirely. - After updates, clear any caching plugins and your browser cache. Troubleshooting Update button is not appearing: - Your WordPress version may be too old to support the current update process. Consider a manual update. - File permissions may prevent WordPress from writing updates. Check that wp-content and its subdirectories have 755 permissions. "Briefly unavailable for scheduled maintenance" message persists: li>Delete the .maintenance file from your WordPress root directory via the Plesk File Manager. White screen after update: - Increase PHP memory by adding define('WP_MEMORY_LIMIT', '256M'); to wp-config.php. - Check error logs in Plesk under Websites & Domains โ Logs. Related Guides - Fix the scheduled maintenance error - Harden security - Back up first
How to Fix Common WordPress 404 Errors
A 404 error means the requested page could not be found on the server. In WordPress, 404 errors on individual posts and pages are most commonly caused by broken permalinks or a corrupted .htaccess file. This guide covers the most common causes and how to fix them. Method 1: Reset Permalinks (Most Common Fix) This is the simplest and most effective fix for WordPress 404 errors on posts and pages: 1. Log in to your WordPress Dashboard (yourdomain.com/wp-admin). 2. Go to Settings โ Permalinks. 3. Without changing anything, scroll to the bottom and click Save Changes. 4. Visit your website and test the pages that were returning 404 errors. This regenerates the rewrite rules in the .htaccess file without changing your URL structure. Method 2: Manually Repair the .htaccess File If resetting permalinks does not work, the .htaccess file may be corrupted: 1. Log in to Plesk. 2. Go to Files โ File Manager. 3. Navigate to public_html. 4. Find the .htaccess file. If you cannot see it, click Settings (top-right) and enable Show Hidden Files. 5. Right-click .htaccess and select Rename. Rename it to .htaccess-old. 6. Go back to WordPress: Settings โ Permalinks โ Save Changes. 7. WordPress will create a fresh .htaccess file with the correct rules. The default WordPress .htaccess should contain: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress Method 3: Check Plugin Conflicts Some plugins (especially security, caching, or SEO plugins) can interfere with permalinks: 1. In WordPress, go to Plugins โ Installed Plugins. 2. Deactivate all plugins. 3. Check if the 404 errors are resolved. 4. Reactivate plugins one at a time, testing your site after each activation. 5. When the 404 error returns, the last activated plugin is the cause. Contact the plugin developer or find an alternative. Method 4: Clear Your Cache - Clear your browser cache (Ctrl+F5 or Cmd+Shift+R). - If you have a caching plugin (WP Super Cache, W3 Total Cache, LiteSpeed Cache), clear its cache. - If your site uses Cloudflare or a server cache, purge it from your hosting or CDN dashboard. Common Causes of WordPress 404 Errors - Changed permalink structure without saving permalinks. - Plugin conflict after installing or updating a plugin. - Corrupted .htaccess file. - Migrated or restored the site without updating the database. - Deleted posts or pages that are still linked in menus. - Case sensitivity โ Linux servers are case-sensitive (e.g., MyPage vs mypage). Important Notes - Your homepage working while other pages return 404 is a strong indicator of a permalink issue. - Always back up your .htaccess file before making changes. - If none of these methods work, the issue may be server-level. Contact your hosting provider. Troubleshooting Permalink reset does not fix the issue: - Check that the .htaccess file is writable (permissions set to 644). - Verify that mod_rewrite is enabled on the server. Contact your hosting provider to confirm. 404 errors on custom post types only: - The plugin that registers the custom post type may need updating. - Go to Settings โ Permalinks โ Save Changes to flush the rewrite rules. 404 error after migrating to a new server: - Update the site URL and home URL in the wp_options table via phpMyAdmin. - Verify the domain DNS is pointing to the correct server. Related Guides - Fix the white screen - Fix DB connection - Update plugins/themes
How to Fix WordPress Maintenance Mode Stuck
This error message appears when a WordPress update was interrupted before it could complete. WordPress creates a temporary .maintenance file to lock the site during updates. If the update fails, this file is not automatically removed, and your site stays locked in maintenance mode. This guide shows you how to fix it. Quick Fix: Delete the .maintenance File 1. Log in to your Plesk account. 2. Go to Files โ File Manager. 3. Navigate to your WordPress root directory (usually public_html). 4. Look for a file named .maintenance. 5. If you do not see it, click Settings (top-right) and enable Show Hidden Files (dotfiles). 6. Right-click .maintenance and select Delete. 7. Reload your website. The error should be resolved. What If the .maintenance File Does Not Exist? If deleting the file does not resolve the issue or the file is not there, try these steps: 1. Check the wp-content/upgrade folder for leftover update files. Delete any files or folders inside it. 2. Check the wp-content/upgrade-core folder if it exists. Delete its contents. 3. Clear your browser cache and reload the site. Re-running the Failed Update After removing the maintenance file, the update that failed may still be available: 1. Log in to your WordPress Dashboard. 2. Go to Dashboard โ Updates. 3. Retry the update that failed (plugin, theme, or WordPress core). Why Does This Happen? - The browser was closed or navigated away during an update. - The server timed out during the update process (common with large plugins or slow servers). - A PHP memory limit was reached during the update. - Internet connectivity was lost during the update. Preventing the Issue - Do not close your browser while an update is in progress. - Update one item at a time instead of updating everything at once. - Ask your hosting provider to increase the PHP memory limit and max execution time if updates frequently fail. - Use the Plesk Backup Manager before performing updates so you can restore if needed. Important Notes - This error is not caused by a hack or security breach โ it is simply an interrupted update. - The .maintenance file is a standard WordPress mechanism. It is created and deleted automatically during successful updates. - If this error keeps occurring, your server may have resource limitations. Contact your hosting provider. Troubleshooting Error persists after deleting .maintenance file: - Clear your browser cache and cookies. - Check wp-content/upgrade/ for leftover files. - Check if there is a plugin conflict โ deactivate all plugins via File Manager (rename the wp-content/plugins folder). Cannot access WordPress admin to retry the update: - Delete the .maintenance file first, then try accessing wp-admin again. - If wp-admin also shows the maintenance message, the file is still present. Double-check that it was deleted. Related Guides - Finish/redo the update - Fix the white screen - Fix 404s
How to Reset Your WordPress Admin Password
If you have forgotten your WordPress admin password or cannot log in to your dashboard, you can reset it using several methods. This guide covers the most common approaches, from the simplest (email reset) to advanced methods using Plesk and phpMyAdmin. Method 1: Use the "Lost Your Password?" Link This is the simplest method if you still have access to the email address associated with your WordPress account: 1. Go to your WordPress login page: yourdomain.com/wp-login.php 2. Click "Lost your password?" 3. Enter your WordPress username or the email address associated with the account. 4. Click Get New Password. 5. Check your email inbox for the password reset email. 6. Click the link in the email and set a new password. Method 2: Reset via phpMyAdmin (When Email Does Not Work) If you cannot receive the reset email, you can change the password directly in the database: 1. Log in to Plesk. 2. Go to Databases โ phpMyAdmin. 3. Select your WordPress database from the left sidebar. 4. Find the wp_users table and click it. 5. Find your admin username in the list. Click Edit (the pencil icon) next to your username. 6. In the user_pass field, you need to enter a new password in hashed format. 7. To generate a hash, visit https://api.wordpress.org/secret-key/1.1/salt/ or use an online WordPress password hash generator. 8. Paste the hashed password into the user_pass field. 9. Click Go to save the changes. 10. Log in to WordPress with your new password. Method 3: Reset via the Emergency Password Reset Script WordPress includes an emergency script that can reset passwords via FTP or File Manager: 1. Download the Emergency Password Reset Script from the WordPress plugin repository (emergency.php). 2. Upload the emergency.php file to your public_html directory via File Manager. 3. Visit yourdomain.com/emergency.php in your browser. 4. Enter your WordPress admin username and the new password. 5. Click Update Options. 6. Immediately delete the emergency.php file from your server after resetting the password. Important Notes - The password reset email may take a few minutes to arrive. Check your spam folder if you do not see it. - If you do not receive the reset email, your server may not be sending emails correctly. Contact your hosting provider. - When using phpMyAdmin, always use a properly hashed password. WordPress will not accept a plain-text password in the database. - After resetting your password, WordPress will log you out of all other sessions. - For security, use a strong, unique password with a mix of uppercase, lowercase, numbers, and symbols. Troubleshooting Password reset email is not arriving: - Check your spam or junk folder. - Verify the email address on your WordPress user profile matches the email address you are checking. - Your hosting provider may have disabled the mail() function. Contact support. phpMyAdmin method does not work (invalid password after change): - Ensure you pasted a valid WordPress password hash, not plain text. - Use the MD5 hash tool in phpMyAdmin to generate a hash, or use the WordPress function wp_hash_password(). Locked out of WordPress entirely: - Contact your hosting provider for assistance. - Use the phpMyAdmin method above to reset the password directly in the database. Related Guides - Log back in - Secure the account - Reinstall if needed