Black Friday hosting deals · every offer with its renewal price

// wordpress & cpanel how-tos

How to reinstall WordPress from your dashboard or cPanel

Hacks, broken updates and strange errors sometimes leave you no choice but to reinstall WordPress. Here are the two easiest ways, starting with the one that doesn't touch your content.

Reinstall WordPress from the dashboard

This is the fastest and easiest method. Log in to your WordPress admin area, then go to Dashboard → Updates. Click the button to re-install the current version of WordPress, and a fresh copy of the core files replaces the old one.

The best thing about this method is that you don't need to replace any files yourself, and your posts, themes, plugins and uploads stay where they are. It's simple and fixes a lot of problems with broken sites, but it can't fix everything, because it only replaces the WordPress core files.

Reinstall WordPress from cPanel

Use this method when you need to reinstall WordPress from scratch and then reconnect your old database and your old wp-content folder (your themes, plugins and uploads).

  1. Back up first. To save time, you only need two things: your database and the wp-content folder. Download wp-content with File Manager or FTP. For the database, open phpMyAdmin in cPanel, select your database and click Export.
  2. Remove the old install. Open Softaculous in cPanel. You'll see your WordPress installs; click the delete icon next to the one you want to remove.
  3. Install WordPress again on the same domain with Softaculous or your host's installer. See installing WordPress with Softaculous.
  4. Restore the old database. In phpMyAdmin, select the new database, select all its tables and choose Drop from the menu. Then click Import, upload your old database file and click Go. The time depends on your database size and connection.
  5. Restore wp-content. Delete the new wp-content folder and upload your old one in its place.

You don't need any extra step to link the database. If your new install uses the same database prefix as the old one, your site comes back with all its content, on a fresh WordPress install. If the prefix is different, change $table_prefix in wp-config.php to match the old tables.

FAQ

Will reinstalling WordPress delete my posts?

Not if you use the dashboard method: it only replaces the core WordPress files. With the cPanel method, your posts are safe as long as you export the database first and import it into the new install.

How do I reinstall WordPress without losing data?

Use Dashboard → Updates and re-install the current version. If you need a completely fresh install, back up your database and wp-content folder, reinstall, then import the old database and replace wp-content with your backup.

Keep reading

WRITTEN BY

Fathi Arfaoui

Fathi Arfaoui has helped people choose web hosting, start blogs and build WordPress sites since 2013. He founded SiteHostingFinder to replace opinion-based hosting reviews with real prices and public data. He has been a HostGator customer since 2013 and has hosted 40-50 WordPress sites on Pressable since 2017.