When do you need to reinstall WordPress?

A. If you are locked out of your WordPress website while running a superceded version of WordPress.

B. If you have been hacked because you are running a superceded version of WordPress or a plugin.

If you are locked out, you can’t get into wp-admin to upgrade the version.
Follow these steps:

  1. In cpanel > databases > MyPhpAdmin > [WP database] > Export [all tables – detailed] to an SQL file on your hard disk > Option Replace.
  2. In FTP or cpanel’s Filemanager copy wp-content/uploads to your hard disk
  3. In cpanel > Softaculous > WordPress > remove the current installation noting the database name.
  4. In cpanel > Softaculous > WordPress > install a new wordpress using the same folder and database name as the last one.
  5. In FTP upload the contents of the previous Uploads folder.
  6. In cpanel > databases > PHPMyAdmin > [WP database] > Import the SQL file you exported from the previous installation. ***
  7. In wp-admin you should now be able to install the theme you used in the previous installation.
  8. WordPress may ask you to click a button to update your database to the latest.
  9. Go to Permalinks and reset any custom setting.

Always use the latest version of WordPress for security. The Dashboard gives you notice of any new version. It’s also wise to update to the latest version of your theme. Older versions of WordPress and themes are more subject to hacking.

Upgrading older versions of WordPress from the dashboard will fail if there too many versions between. The only option then is to reinstall WordPress as above.

*** If there have been several versions of WordPress since the old database, there may be some fields not in the latest MySQL database. This will cause the import to fail with an error. Then edit the structure for the table that fails and insert the field names and details that caused the error.