You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Virtualmin安装WordPress后install.php无法访问的问题求助

Troubleshooting WordPress Install.php Not Found in Virtualmin

Hey there, let's work through this issue step by step—this is a common hiccup with Virtualmin's script installer, and I’ve fixed it a bunch of times before. Here are the most likely causes and fixes:

1. Verify WordPress Files Actually Exist

First, let’s confirm the install.php file is where it’s supposed to be. You can do this two ways:

  • Via Virtualmin File Manager: Log into Virtualmin, navigate to your virtual host, click File Manager, and check the public_html/wordpress/wp-admin directory. If install.php is missing, the script installer probably failed to deploy all files (even if it said it succeeded).
  • Via SSH: Connect to your server and run this command (replace yourdomain with your actual domain):
    ls -la /home/yourdomain/public_html/wordpress/wp-admin/install.php
    

If the file doesn’t exist, skip to step 5 to reinstall WordPress via the script.

2. Check Your Virtual Host’s Document Root

Virtualmin might be pointing to the wrong directory for your website. Here’s how to fix it:

  1. In Virtualmin, go to your virtual host > Server Configuration > Website Options.
  2. Look for the Document root field. If you installed WordPress in public_html/wordpress, you have two options:
    • Change the document root to /home/yourdomain/public_html/wordpress (so your site loads directly from the WordPress folder), or
    • Move all WordPress files from public_html/wordpress to public_html (the standard setup for most sites).
  3. After making changes, restart your web server:
    • For Apache: sudo systemctl restart apache2
    • For Nginx: sudo systemctl restart nginx

3. Fix File Permissions

Incorrect permissions are a frequent culprit—Virtualmin sometimes sets permissions that prevent the web server from reading files. Run these commands via SSH (replace yourdomain):

# Set correct owner for all WordPress files
chown -R yourdomain:yourdomain /home/yourdomain/public_html/wordpress/

# Set file permissions to 644 (readable by web server)
find /home/yourdomain/public_html/wordpress/ -type f -exec chmod 644 {} \;

# Set directory permissions to 755 (accessible by web server)
find /home/yourdomain/public_html/wordpress/ -type d -exec chmod 755 {} \;

4. Check URL Rewrite Configuration

If you’re using Apache, make sure the .htaccess file in your WordPress directory has the correct rewrite rules. It should look like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
# END WordPress

If you’re using Nginx, add this block to your virtual host’s configuration file (under the server section):

location /wordpress {
    try_files $uri $uri/ /wordpress/index.php?$args;
}

Don’t forget to restart your web server after editing these files.

5. Reinstall WordPress via Virtualmin Scripts

If none of the above works, the script installer might have had an unseen error. Go back to your virtual host in Virtualmin, click Install Scripts, find WordPress in the list, and select Reinstall. Double-check that the installation path is correct (either public_html or public_html/wordpress) before starting.

内容的提问来源于stack exchange,提问作者def_not_tom

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 09:07:00