无法访问phpMyAdmin且本地WordPress网站无法打开问题求助
Hey there, let's work through this tricky WordPress migration mess you're dealing with—you've got a few overlapping issues, but we can sort them out one by one to get both your local site back up and your live site ready to launch.
1. First, Fix Your Local WordPress Site (It's Your Safety Net)
Your local site is your original backup, so let's get that working first:
- Open your local WordPress root folder and locate the
wp-config.phpfile. Double-check thatDB_NAME,DB_USER,DB_PASSWORD, andDB_HOSTmatch exactly what your local database setup uses. If you changed the root password recently, make sure the WordPress database user (not necessarily root—you should have a dedicated user for WP) has the correct password set. - Fire up your local database tool (like phpMyAdmin) and verify the user for your WordPress database has the right password. If not, reset it there, then update the password in
wp-config.php. - Restart your local server services (Apache/MySQL if you're using XAMPP/WAMP)—sometimes a simple service restart fixes connection glitches that make the site unresponsive.
2. Fix Database Access Rejections (Root Isn't the Answer)
You mentioned updating the root password but still getting denied—here's the thing: you shouldn't use the root database user for WordPress (it's a security risk, and many hosts block root access anyway).
- For your local database: Confirm which non-root user is assigned to your WordPress database, reset their password in phpMyAdmin, and sync that password to your local
wp-config.php. - For your live host database: If you can't access Cpanel, check if your host offers a direct phpMyAdmin entry (many do via their main customer dashboard). Once in, create a dedicated database user for your WordPress site, grant them full permissions to the database you created, then import your compressed SQL file into that database. Update the live
wp-config.phpwith this new user's credentials.
3. Regain Access to Cpanel
If resetting your Cpanel password still isn't working, try these quick fixes:
- Make sure you're using the correct login URL—some hosts use
cpanel.yourdomain.cominstead ofyourdomain.com/cpanel, or a specific IP address with a port (like123.45.67.89:2083). Check your host's welcome email for the exact login link. - Clear your browser's cache and cookies—old login session data can sometimes cause authentication failures even with a new password.
- If all else fails, reach out to your host's support team—they can reset your password directly or troubleshoot why the login is failing (it might be a server-side issue you can't fix on your own).
4. Wrap Up the Manual Migration Correctly
Since Duplicator didn't work, let's make sure your manual migration covers all bases:
- Upload all your local WordPress files (every folder and file in the root directory) to your host's site root (usually
public_html). Missing even a single file can break the site. - After importing your database, open phpMyAdmin on the host, navigate to the
wp_optionstable (adjust the prefix if you changed it fromwp_), and update thesiteurlandhomefields to match your live domain (e.g.,https://yourdomain.com). - Double-check that your live
wp-config.phphas the correct database name, user, password, and host—even a tiny typo here will cause connection errors.
内容的提问来源于stack exchange,提问作者Eszter Melisande Rehák

