// 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).
- Back up first. To save time, you only need two things: your database and the
wp-contentfolder. Downloadwp-contentwith File Manager or FTP. For the database, open phpMyAdmin in cPanel, select your database and click Export. - 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.
- Install WordPress again on the same domain with Softaculous or your host's installer. See installing WordPress with Softaculous.
- 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.
- Restore wp-content. Delete the new
wp-contentfolder 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.