How to restore the WordPress system files at Hostinger

Restore damaged WordPress system files at Hostinger via SSH, File Manager, or FTP without changing your database, content, plugins, or themes.

Updated 3 weeks ago

Restore the WordPress system files at Hostinger to fix damaged core files while keeping your website’s latest content and changes. There are two methods:

Whichever option you choose, you do not need to make any changes to the database. The SSH option is the easiest, as you would only need to run one command, and it is available on all hosting plans except for Single web hosting plan.

Option 1 – Restoring WordPress system files via SSH

Step 1 – Connect via SSH

Connect to your account via SSH and open the directory where you installed WordPress. For most domains, it will be the public_html folder, so to reach the path use the following command:

cd domains/domain.tld/public_html

Replacing domain.tld with your domain.

Step 2 – Restore files

Once there, run the following command:

wp core download --skip-content --force

When the process is completed, check your website in incognito mode, and it should be working now.

Option 2 – Restoring WordPress system files via FTP or file manager

Step 1 – Preparation

First, create a fresh backup of your website. You can do that by using the backup tool on Hostinger dashboard or by connecting via FTP and downloading all your website’s files.

Step 2 – Download the official WordPress system files

Go to WordPress.org and download the archive with the core files of WordPress, that is, a clean installation that does not include any plugins or themes. Make sure to download the same version from your current installation, be it the latest version or an older one.

Using previous WordPress versions may present security risks – try to keep the latest version possible, eg. by updating the core files after the restoration.

Once done, extract the files on your device. The result will look like this:

Step 3 – Upload the WordPress files to your hosting

Next, upload these files and folders to your hosting, with the following exceptions:

  • The wp-content folder

  • The wp-config.php file

To do it via File Manager, open Websites → Manage site, search for File Manager on the sidebar and click on it:

Make sure you are in the directory where WordPress is installed and click Upload → Upload files:

Select the WordPress files and folders on your device, excluding the wp-config folder. When File Manager says a file already exists, select Replace and click Continue:

Alternatively, if you’re using FileZilla (or another FTP client of your choice), upload the WordPress files, except the wp-content folder and wp-config.php file and when asked, choose Overwrite:

Dialog with Resume option selected and OK button at bottom

Once the uploading process is done, you can check your website using the incognito mode of your browser. It should be working, and your content will be saved!

If you still find your website not working after doing all the steps, you can restore your website from a backup. It will revert the files and database to their previous state. If WordPress shows “There has been a critical error on this website”, follow How to fix the “There has been a critical error on this website” error in WordPress first.