500 Error Caused by Incorrect Permissions or Ownership
A 500 Internal Server Error may occur after migrating a WordPress site, often due to incorrect file permissions or ownership settings on files and directories.
Check File System Permissions
Ensure that file and folder permissions follow the recommended settings for WordPress:
- 644 for files
- 755 for directories
You can verify and adjust permissions via an FTP client or using SSH access.
Incorrect Ownership of the Root Folder
If the permissions are correct but the error persists, the issue may lie with the ownership of the public_html
folder or root directory of the site.
On cPanel-based servers, the web server (httpd
) may run under the user nobody
. In such cases, ownership should be assigned accordingly.
Fixing Ownership via Shell
To quickly set the correct ownership for your site files and directories, use the following command via SSH shell:
chown -R nobody /home/<username>/public_html
Replace <username>
with your actual cPanel account username.
Alternative via FTP Client
Some FTP clients offer the ability to change file ownership, but this action is not always supported or properly applied, depending on the server configuration.
To prevent misconfigurations, we recommend opening a support ticket. Our technical team will apply the correct permissions and ownership safely on your behalf.