Blog
SavedSearch
Visit Hostlelo

After a Host Breach: Rotate Email, FTP and WordPress Logins

Your host reported an incident. Here is the order to change mailbox, FTP and WordPress logins, remove hidden forwarders and end sessions that outlive passwords.

The short answer

After a hosting incident, secure the hosting or control-panel account first: change its password from a trusted device, enable 2FA and review active access. Then back up files and the database, rotate mailbox and FTP passwords, remove unknown forwarders, refresh WordPress salts, destroy sessions, inspect admins and revoke application passwords. Change reused credentials elsewhere.

Email, server and website credentials rotate inside a protective shield as old access tokens are revoked.
Reading options

On this page

After a hosting incident, secure the hosting or control-panel account first: change its password from a trusted device, enable two-factor authentication and review active access. Then take a fresh files-and-database backup before editing the site, rotate every mailbox and FTP password, remove unknown forwarders, refresh WordPress salts, destroy sessions, inspect administrators and revoke application passwords. Change reused credentials elsewhere.

DreamHost’s official incident update says an attacker exploited third-party File Manager software and accessed FTP or SFTP credentials for users who had logged in before the issue was detected on 23 October 2026, plus certain webmail credentials for a limited subset. DreamHost says the affected fraction was well under approximately 10%, a small number of mailboxes may have had contents viewed, and it found no evidence that control-panel or billing details were accessed. This checklist is intentionally broader than that incident because another host breach can expose a different control layer.

By the end of this guide you will be able to rotate every common credential on a cPanel and WordPress site, check that the old ones no longer work, and tell your team what changed.

What credential rotation actually is

Rotating a credential means replacing a password, key or login token with a new one, so that anything an attacker copied stops working. A credential is any secret that proves who you are to a system: a mailbox password, an FTP password, a WordPress login cookie, an API token.

Think of moving into a flat after the old tenant had keys cut. You change the locks, but you also check the post is not redirected to their new address and no spare key sits under the mat. Forwarders are the redirected post. Sessions and application passwords are the spare keys.

Why this matters: anything an attacker left behind, such as a forwarder or session, can survive a simple password change. Rotation in the right order removes those leftovers too.

Before you start

Give yourself a quiet half hour. None of these steps are risky for your files if you follow them, but some will log people out, and one menu option can delete your website if you click the wrong button. Have these ready:

  • Your control panel login (cPanel in the examples below) and access to your host's client area.
  • A password manager, so you can generate and store long, unique passwords.
  • A list of everyone who uses a mailbox or FTP account on the site, with a phone number or chat contact for each.
  • SSH access with WP-CLI installed, if you want the command line route for WordPress. WP-CLI is the official command line tool for WordPress.
  • A fresh backup of your files and database, downloaded to your own computer.

Heads up: resetting a mailbox password locks out everyone using that mailbox until they enter the new password on every device. DreamHost’s official status guidance says account owners had to pass new credentials to individual FTP, SFTP and mailbox users through another trusted channel. Plan that communication before you begin.

If your domain registrar had the incident rather than your host, read our 123-reg checklist for UK domain owners as well, because registrar accounts need their own steps.

The rotation order, step by step

The order below starts with the logins that control everything else and works down. If you change a mailbox password while an attacker still holds your control panel login, they can simply change it back.

Step 1: Secure the main hosting and control-panel account

Log in to your host's client area and change the main account password, then the cPanel password if it is separate. Turn on two factor authentication (a second login check, usually a code from an app on your phone) while you are there. Our guide to two factor authentication in cPanel, Plesk and DirectAdmin walks through each panel.

Why this matters: the cPanel docs say the main FTP account, listed under Special FTP Accounts, has access to every file in your cPanel account, including files outside public_html. The docs say you cannot modify or delete the special accounts. Ask your host how that main login is rotated on your plan, and do it now.

Step 2: Save a working backup and a protected copy of wp-config.php

After securing the main account, take a full backup with your host’s backup tool and download it. Do not restore that backup blindly until it has been checked, because it may contain the same compromise. Make a separate protected copy of wp-config.php for rollback before Step 7 rewrites part of it.

This command, run over SSH from the folder that holds WordPress, copies wp-config.php to a backup file next to it:

cp wp-config.php wp-config.php.bak

You should see no output, and ls should now show both files. Delete the .bak file when you are done, because it holds your database password in plain text.

Step 3: Change every mailbox password

In cPanel, go to cPanel > Home > Email > Email Accounts, find the address, and click Manage. This opens the Manage an Email Account screen.

  1. Scroll to the Security section.
  2. Type a new password in the New Password box, or click Generate to let cPanel create a strong one.
  3. Click Update Email Settings at the bottom of the screen.
  4. Save the new password in your password manager before you leave the page.

Repeat this for every mailbox, including old ones like info@ that nobody reads. Those are where a forwarder can hide for months.

Quick tip: cPanel cannot show you an old password. The docs say passwords cannot be retrieved, only replaced. So write the new one down in your password manager first, then send it to the user.

While you are on the Manage an Email Account screen, look at the Restrictions section too. You can set Logging In to Suspend for a mailbox you are not sure about, which stops anyone logging in while you investigate. You can also set Sending Outgoing Mail to Hold, which keeps outgoing messages in a queue instead of sending them.

Heads up: the cPanel docs say suspending an account also disables any aliases or forwarders that redirect mail to it. And if you later change outgoing mail from Hold back to Allow, the server delivers every queued message. Look at that queue before you release it.

Step 4: Review and remove email forwarders

A forwarder (a rule that sends a copy of incoming mail to another address) is the quietest way to keep reading someone's email after they change their password. This is the step people skip.

Open the Forwarders screen in cPanel. By default, the Email Account Forwarders table lists every forwarder on every domain in your account.

  1. Read the full list. Use the Managing menu to filter by domain, or type an address in the Search box and click Go.
  2. For each forwarder whose destination you do not recognise, click Delete in the Actions column.
  3. Click Delete Forwarder to confirm.
  4. Check the Forward All Email for a Domain table on the same screen as well, and remove any domain forwarder you did not set up. Use Delete, then Delete Domain Forwarder.

You cannot edit a forwarder in cPanel. If a legitimate one points to the wrong place, delete it and create a new one.

Quick tip: forwarders in cPanel are not the only place forwarding can hide. Many webmail apps and mail clients also let a user set their own forwarding rules or filters. Ask each mailbox user to look in their webmail settings, or log in and look yourself with the new password.

Step 5: Change FTP account passwords and remove old ones

FTP (File Transfer Protocol) and SFTP (its encrypted cousin that runs over SSH) let someone upload files straight into your site. A stolen FTP password is a direct route to planting malware.

Open the FTP Accounts screen in the Files section of cPanel. For each account:

  1. Click Change Password.
  2. Enter the new password in Password and again in Password (Again), or click Password Generator.
  3. Click Change Password to save.

For any FTP account nobody uses any more, delete it. When you click Delete, cPanel gives you a choice, and this is the one place in this guide where a wrong click can hurt.

  • Delete Account removes the login only and keeps the files. Choose this one.
  • Delete Account and Files removes the login and every file in its home folder.

Heads up: the cPanel docs warn that if the account can reach public_html, Delete Account and Files removes the public_html folder and all of its contents, which will break your website. Always choose Delete Account unless you are certain.

Step 6: Tell your users

Before you touch WordPress, send the new mailbox and FTP passwords to their owners over a different channel from email. A phone call or a chat message works. Remind them to update every device, or their phone will keep trying the old password and may trigger a lockout.

Imagine a made-up example: Priya runs a bakery site with three mailboxes. She changes all three passwords at 10:00 but forgets her assistant, who spends the morning typing the old password into her phone and assumes the site is broken. A two line text at 10:01 would have saved that.

Step 7: Refresh the WordPress salts

WordPress salts are long random strings stored in wp-config.php. The official page describes the command only as refreshing them.

This command replaces the default WordPress core salt keys in wp-config.php with new random values:

wp config shuffle-salts

You should see Success: Shuffled the salt keys. If your config file lives somewhere unusual, point to it with the --config-file=<path> option.

Heads up: the command downloads fresh salts over the internet. It has an --insecure flag that retries without checking the TLS certificate if the secure connection fails. The official page warns this makes the request open to a man in the middle attack. Do not use it during a security cleanup.

Why this matters: the official command page says the command refreshes the salts. It does not say what happens to people who are already logged in. So do not rely on it alone to log everyone out. Step 8 does that explicitly.

Step 8: Destroy every login session

A session is the record WordPress keeps of a logged in browser. If an attacker logged in as one of your users, their session can stay valid after you change the password, unless you end it.

This command ends every session for one user (replace admin with the login, email or user ID):

wp user session destroy admin --all

You should see Success: Destroyed all sessions. This command, from the official WP-CLI page, loops over every user on the site and ends all of their sessions:

wp user list --field=ID | xargs -n 1 wp user session destroy --all

You will see one success line per user. Everyone, you included, must log in again.

Step 9: Review administrator accounts

Attackers often add a quiet extra administrator so they can come back later. This command lists every administrator with their display name and email:

wp user list --role=administrator --fields=ID,user_login,display_name,user_email --format=csv

If you see an admin you do not recognise, write down the ID, login and email before you delete anything, because that record helps trace how they got in. Then remove or downgrade the account through Users in the WordPress dashboard.

Next, give every remaining administrator a new password. This command resets the password for every administrator and emails each one a notification:

wp user reset-password $(wp user list --format=ids --role=administrator)

Quick tip: there is also wp user update with --user_pass=<password>, which sets a password you choose. The official page describes --user_pass as the plain text password, so you would type it into the command. wp user reset-password avoids that. If you want to see a new password on screen instead of emailing it, add --show-password to a single user reset, for example wp user reset-password editor --show-password.

Step 10: Revoke application passwords

Application passwords are separate passwords WordPress gives to apps and scripts that talk to your site through the REST API (the interface other programs use to read and change your content). They do not change when the user's main password changes, so they are a classic spare key. Our guide to WordPress application passwords explains how they work.

This command lists the application passwords for user ID 1, with their names and when they were last used:

wp user application-password list 1 --fields=uuid,name,created,last_used,last_ip

To revoke one, copy its UUID (the long ID in the first column). This command deletes a single application password, using the example UUID from the official page:

wp user application-password delete 1 6633824d-c1d7-4f79-9dd5-4586f734d69e

If you are not sure which apps still need access, revoke them all and reconnect the ones you actually use. This command deletes every application password for user ID 1:

wp user application-password delete 1 --all

You should see Success: Deleted all application passwords. Repeat for each administrator and editor.

Step 11: Change reused passwords elsewhere

DreamHost’s official incident notice advises customers who reused an affected password on another platform to change it there too. That advice applies after any credential incident. Start with the domain registrar and primary email account, then work through every other service where the old password was reused.

Doing it without WP-CLI

No SSH? You can still cover the WordPress side from the dashboard, it just takes more clicks.

  • Go to Users and read the full list, filtered to administrators. Remove anyone you do not recognise, after writing down their details.
  • Open each administrator's profile and set a new password.
  • If your WordPress version shows an application passwords section on the profile page, revoke any you do not recognise there.
  • Ask your host to refresh the salts in wp-config.php for you, or edit the file through the cPanel File Manager after taking a copy.

How to check it worked

Check right after you finish, then again a day later.

  1. Try to log in to webmail with an old mailbox password. It should be refused.
  2. Try to connect to FTP with an old FTP password in your file transfer app. It should be refused.
  3. Reopen the Forwarders screen in cPanel and confirm every row in both tables is one you set up yourself.
  4. Run the session check below for each administrator.

This command counts the open sessions for the admin user:

wp user session list admin --format=count

Right after Step 8 you should see 0, and 1 after you log back in. A number that climbs when nobody on your team logged in is worth a closer look.

This command shows each session's login time, IP address and browser:

wp user session list admin --fields=login_time,ip,ua
  1. Run the administrator list from Step 9 again and confirm only known people appear.
  2. Run the application password list for each admin and confirm it is empty or holds only apps you reconnected.

If you want to be sure no files were changed, the next step is verifying WordPress core files with WP-CLI checksums, which compares your files with the official copies.

Troubleshooting

The new password is rejected in cPanel

Symptom: cPanel will not save the new password and points to its strength. Cause: the password is too weak for the rules on your server or account. Fix: click Generate (for mailboxes) or Password Generator (for FTP) and use the password it creates.

A user's phone keeps asking for the password

Symptom: mail stops arriving on a phone, or the phone keeps popping up a login box. Cause: the mail app still holds the old password. Fix: open the account settings in the mail app and type the new password for both incoming and outgoing mail.

A forwarder needs a new destination

Symptom: you cannot find an edit button for a legitimate forwarder that points to the wrong address. Cause: cPanel does not let you modify an existing forwarder. Fix: delete it with Delete then Delete Forwarder, and create a new one with the right destination.

Forwarders stopped working on one address

Symptom: mail sent to an alias no longer arrives anywhere. Cause: you suspended the mailbox it points to, and the cPanel docs say suspending an account also disables aliases and forwarders that redirect to it. Fix: set the mailbox restrictions back to Allow once you have finished checking it.

shuffle-salts fails with a TLS or certificate error

Symptom: wp config shuffle-salts cannot download new salts because the secure connection fails. Cause: the server cannot verify the certificate of the salt API, often because of an old certificate bundle. Fix: ask your host to update the server's certificate bundle. Do not reach for --insecure, for the reason in Step 7.

WP-CLI cannot find WordPress

Symptom: WP-CLI says it cannot find a WordPress install. Cause: you are running it from the wrong folder. Fix: change into the folder that holds wp-config.php, or add the global --path parameter pointing to it, for example --path=/home/example/public_html.

The xargs loop does not work

Symptom: the all users session command fails on your system. Cause: xargs is not available in your shell, for example in a plain Windows command prompt. Fix: run wp user list --field=ID, then run wp user session destroy <ID> --all once for each ID it prints.

When to call your host or a developer

Rotation closes the doors. It does not tell you whether someone already walked through one. Get help if:

  • You found an administrator, forwarder or application password you did not create.
  • The session list shows logins from IP addresses nobody on your team uses.
  • Your site shows pages, redirects or scripts you did not add.

Keep the notes you made in Steps 4 and 9. A developer can do far more with a written login name, email and user ID than with "something looked odd".

The one message worth forwarding

Copy this and send it to your team or developer:

"Hi, our host reported a security incident, so I have rotated our logins. I changed the hosting and cPanel password and turned on 2FA, reset every mailbox and FTP password, removed unknown email forwarders, refreshed the WordPress salts, logged out every WordPress user, checked the admin list and revoked application passwords. Your new mailbox password is coming by text. Please update it on every device, check your webmail for any forwarding rules you did not set up, and change it anywhere else you used the old one. Tell me straight away if you see anything you did not do."

The takeaway: a password change only helps if you also remove the forwarders, sessions and app tokens an attacker could have left behind, so work through the whole list in order.

Reader questions

Does changing my email password remove forwarders an attacker added?

No. A forwarder is a separate rule, so it keeps copying mail after a password change until you delete it from the Forwarders screen.

Will wp config shuffle-salts log everyone out?

The official WP-CLI page only says it refreshes the salt keys and does not describe the effect on logged in users. Run wp user session destroy with --all for each user afterwards so you are not relying on it.

Do WordPress application passwords change when I reset a user's password?

They are separate credentials, so list them with wp user application-password list and delete any you do not need.

Can I see a mailbox's current password in cPanel?

No. The cPanel documentation says passwords cannot be retrieved, only replaced with a new one.

Is it safe to delete an old FTP account?

Yes, if you choose Delete Account, which keeps the files. Avoid Delete Account and Files, because if the account can reach public_html it removes the site's files.

What if I suspect a mailbox but cannot reach its owner yet?

In the Restrictions section of Manage an Email Account, set Logging In to Suspend, and set outgoing mail to Hold so messages queue instead of sending.

Should I use wp user update with --user_pass to set new passwords?

It works, but you must type the password into the command in plain text. wp user reset-password generates a new one and can email the user instead.

Sources & further reading

  1. DreamHost: October Security Incident
  2. DreamHost KB: Current Status Notifications
  3. BleepingComputer: DreamHost forces email, FTP, SFTP password resets
  4. cPanel Docs: Manage Email Accounts
  5. cPanel Docs: Forwarders
  6. cPanel Docs: FTP Accounts
  7. WP-CLI: wp config shuffle-salts
  8. WP-CLI: wp user session destroy
  9. WP-CLI: wp user session list
  10. WP-CLI: wp user list
  11. WP-CLI: wp user reset-password
  12. WP-CLI: wp user application-password delete

Originally published . About our editorial updates.

Your next project deserves a better foundation.

Explore hosting built for your next chapter.

Explore hosting

Find your next answer.

Search published guides and articles.

Ctrl / ⌘ K to open · Esc to close