What this usually means
A hack usually involves more than one set of credentials, and attackers often keep a spare. You need to replace all of them, plus the keys WordPress uses to keep people logged in.
- Hosting account and the email address that controls it
- FTP, SFTP and SSH logins
- The database password (also stored in wp-config.php)
- Every WordPress user, especially administrators
- Any API keys, payment gateway and SMTP logins used by the site
Step by step
Use a clean device
Updated, with a password manager, and not shared.
Change in order
Email and hosting first, then FTP/SSH, then the database, then WordPress users. Use long, unique passwords.
Regenerate the security keys and salts
Replace the eight lines in wp-config.php with new ones from the official WordPress generator. It logs everyone out, which is the aim.
Replace third-party keys
Payment, email and API credentials, and remove users you no longer need. Turn on two-factor authentication.
The generator for new keys
https://api.wordpress.org/secret-key/1.1/salt/
When to get help
If you aren’t comfortable editing wp-config.php, get help. We’ll arrange secure access, and don’t need you to send a password by email.