The only and the best thing to do in that case is to re-upload all of your website's files.


1. Go to cPanel > File Manager and find your website's folder inside the public_html folder.

2. Delete all Wordpress files besides wp-config.php and wp-content/uploads. If you find PHP files in your wp-content/uploads folder or its subfolders, delete those files as well.

3. Go to https://wordpress.org/download/ and download the latest version of Wordpress.

4. Extract the zip or tar file and upload the contents of the "wordpress" folder, using FTP or File Manager, into your website's folder.

5. Navigate to "http://your-domain.com/wp-admin/" and log in. If you see a blank page, then this can mean you have to upgrade your website's tables. Go to "http://your-domain.com/wp-admin/upgrade.php" to do that.


Now you should be able to log in to wp-admin without any issues, and you can reinstall your Wordpress plugins and theme.


The best thing to do to prevent hacking is to keep all of your plugins, theme, and your Wordpress installation up to date. Do not use nulled/cracked themes or plugins. Wordpress is an easy target for hackers if not managed properly. Make sure you use a security plugin like Wordfence, Sucuri, All-in-one WP Security, or any other security plugin that you like.


And most importantly, keep backups of your website!