误将WordPress安装至GoDaddy运行中网站同目录,如何检查文件变更?
Hey there, let’s walk through how to diagnose the mess from accidentally installing WordPress into your existing site’s directory. The slowdown and rogue PHP processes are almost certainly from conflicting files or duplicated scripts—here’s how to get to the bottom of it:
The quickest way to see what WordPress touched is to check file modification timestamps.
- If you have SSH access, run this command in your site’s root directory:
ls -lt | head -30
This lists files sorted by modification time (newest first). Any files with timestamps matching when you ran the installer are either new WP files or overwritten existing ones. - If you’re using cPanel’s File Manager, switch the sort order to "Modified" (usually a dropdown at the top) to quickly spot recent changes.
To tell exactly which files were added or overwritten:
- Download a fresh copy of the same WordPress version you accidentally installed (check the
wp-includes/version.phpfile in your site if you don’t remember). - Unzip it locally or on your server.
- Run a directory diff command via SSH:
diff -r /path/to/your/live/site /path/to/fresh/wordpress
This will output:- Lines starting with
Only in /path/to/your/live/site:: These are your original files that WP didn’t touch. - Lines starting with
Only in /path/to/fresh/wordpress:: These are new WP files added to your site. - File differences: These are your original files that were overwritten by WP’s versions.
- Lines starting with
WordPress adds several unique directories and files that might clash with your existing site:
- Look for new directories like
wp-admin,wp-includes, andwp-content(if your site didn’t already have one with that name). These are dead giveaways of the WP installation. - Check for overwritten root files: WordPress replaces or creates
index.php,wp-config.php(if you went through the setup), and.htaccess(if permalinks were set). If your original site used any of these, they’re likely now mixed with WP code.
The lag is probably from conflicting PHP code (e.g., duplicate function definitions) or overlapping scripts running:
- Use SSH to run
toporhtop—look for PHP processes with high CPU/memory usage. Note the script path (e.g.,public_html/wp-admin/index.php) to see if WP scripts are running unexpectedly. - Check your server’s error log (usually
error_login your site root, or in cPanel’s "Error Logs" tool). Look for errors like:Cannot redeclare function X: This means your original site and WP have duplicate functions.Failed opening required file: Missing files from partial installation.
- In cPanel’s "Process Manager", you can kill any stuck PHP processes temporarily to see if performance improves (just don’t kill critical system processes!).
If you accidentally entered your existing site’s database credentials during the WP setup, WP might have created new tables (usually prefixed with wp_ by default).
- Use phpMyAdmin (via cPanel) to browse your database. Look for tables you don’t recognize—these are likely WP’s core tables. They won’t overwrite your existing tables unless you used the same prefix, but they’ll take up space and might cause confusion down the line.
As a temporary check, rename the WP-specific directories (wp-admin, wp-includes) to something like wp-admin-old and wp-includes-old. Then reload your site—if performance improves, you know the conflict is coming from WP’s core files.
内容的提问来源于stack exchange,提问作者Swapan Kumar Manna

