使用Cyberduck上传WordPress网站后出现空白黑页求助
Hey there! Let’s work through this blank screen issue—totally expected to hit a few bumps on your first WordPress project, so let’s break down the most likely fixes, starting with the file structure you mentioned.
1. Double-Check Your Uploaded File Hierarchy
This is the #1 culprit for new WordPress users uploading via FTP tools like Cyberduck. Here’s what to verify:
- Your server’s website root directory is usually named
public_html,www, orhtdocs. You need to upload the contents of your WordPress folder (not the folder itself) into this root directory. - For example: If you have a local folder named
wordpressthat containswp-admin,wp-content,wp-includes, and root files likewp-config.php, you should drag all those files/folders directly into your server’spublic_htmlfolder—not the wholewordpressfolder. If you upload the folder itself, your site would only load atyourdomain.com/wordpress, and the main domain would show a blank screen.
2. Verify Your wp-config.php Setup
If your file structure looks right, the next thing to check is your database configuration:
- Make sure you’ve copied
wp-config-sample.php(from your WordPress files), renamed it towp-config.php, and filled in the correct database details (database name, username, password, and host) provided by your web host. - A misconfigured
wp-config.phpwill almost always cause a blank screen because WordPress can’t connect to its database.
3. Enable WordPress Debug Mode to See Errors
Blank screens often hide PHP errors that WordPress suppresses by default. Let’s turn on debugging to see what’s going wrong:
- Open your
wp-config.phpfile (either locally or via Cyberduck on the server). - Find the line that says:
define('WP_DEBUG', false); - Change it to:
define('WP_DEBUG', true); - Save the file and refresh your website. You should now see a specific error message that points to the exact issue (e.g., missing file, database connection failure).
4. Check File Permissions
Incorrect file permissions can prevent the server from reading your WordPress files:
- In Cyberduck, right-click any file or folder and select Get Info.
- Set folder permissions to
755and file permissions to644. Most web hosts recommend these settings for security and functionality.
Start with the file structure check first—it’s the most common fix for this exact scenario. If that doesn’t resolve it, move through the other steps one by one.
内容的提问来源于stack exchange,提问作者user9805994

