WordPress 7.1.5: Audit Contributor and Author Accounts
WordPress 7.1.5 fixed 20 security issues, 7 of them tied to roles below Administrator. Update, then use WP-CLI to review, demote or delete old accounts.
The short answer
WordPress 7.1.5, released on 18 November 2026, fixes 20 security issues, and 7 of them are labelled with a logged-in role from Subscriber+ to Editor+. Update first, then use WP-CLI to list every Contributor, Author, Editor and Administrator. Demote or delete the accounts nobody needs, end their sessions, and remove unused Application Passwords.
Reading options
On this page
Update to WordPress 7.1.5 first, then check every account that can log in to your site. The update closes the holes, and the audit removes the old accounts that someone could still use to reach them.
Here is the fact that made me write this. WordPress 7.1.5 came out on 18 November 2026 with 20 security fixes, and 7 of those fixes are labelled with a logged-in role such as Contributor+ or Author+, which means the attacker needs an account first. Two more mention the Administrator role.
By the end of this guide you will be able to update core with WP-CLI, list every user by role, demote or delete the ones you no longer need, end their old logins, and clear out forgotten Application Passwords.
Why do old accounts matter after a security update?
A role in WordPress is a named set of permissions, like Author or Editor. Each single permission inside a role is called a capability, for example publish_posts or upload_files.
Here is an analogy: an office keycard. The update fixes some broken locks. But a former freelancer with a working keycard can still walk in and try the next broken lock that nobody knows about yet.
Here is how I counted the 7. I went through all 20 items on the official release page and counted those labelled with a role below Administrator: three Contributor+, two Author+, one Editor+ and one Subscriber+. Two more mention a site Administrator.
These are the 7, in the words of the release page, shortened a little:
- Contributor+ XSS via scripts in oEmbed provider responses.
- Contributor+ stored XSS in the Comment Date block via its date format.
- Contributor+ stored XSS in the block editor via media filenames when converting a media block to a File block.
- Author+ authorization bypass via comment editing in the admin.
- Author+ information disclosure exposing user email addresses via the REST API comments endpoint.
- Editor+ information disclosure via post and template author assignment in the REST API.
- Subscriber+ information disclosure via XML-RPC
wp.getComments.
Some plain definitions. XSS (cross-site scripting) means someone gets their own script to run in another person's browser on your site. The REST API is the way apps and the block editor talk to WordPress over the web. XML-RPC is an older way for remote apps to talk to WordPress.
The "+" matters. "Contributor+" means a Contributor or any role above it, so one forgotten Contributor account is enough.
Heads up: some fixes need no account at all. The same page lists unauthenticated stored XSS via shortcode attributes in comments, and an unauthenticated privilege escalation via Template Part block attributes that could lead to remote code execution. Those are the reason to update today.
On multisite, the page also lists a privilege escalation letting a site Administrator take over a Super Admin account through Customizer menu previews. So review every site Administrator too.
What each role can do
The official Roles and Capabilities page describes the roles like this:
- Subscriber can only manage their profile. Its only capability is
read. - Contributor can write and manage their own posts but cannot publish them. It has no
publish_postsand noupload_files. - Author can publish and manage their own posts, and it has
upload_files. - Editor can publish and manage posts, including the posts of other users. It can also moderate comments.
- Administrator has access to all the administration features within a single site.
One capability is worth knowing by name: unfiltered_html. The docs say it lets a user post HTML or even JavaScript, and warn that enabling it for untrusted users may result in malicious code.
On a single site, the per-role lists give it to Editor and Administrator. On multisite, only Super Admins have it. Quick tip: the big table on that page has two unfiltered_html rows that disagree, so I relied on the per-role lists.
Why this matters: an Editor can already post raw script. Fine for a trusted editor, and a good reason no unused Editor account should exist.
Before you start
Give yourself a short checklist before you run anything:
- You can log in as an Administrator, and you have SSH access to the server.
- WP-CLI is installed. Run
wp --infoand you should see a line with your WP-CLI version. - You know where your WordPress folder is, the one that holds
wp-config.php. - You have a fresh backup of the database and the files, or you are about to make one in Step 1.
- You have a short list of people who must stay logged in today, such as the editor who is publishing this afternoon.
- You have 30 to 60 minutes free. Small sites take less, but do not rush role changes.
Quick tip: run every command from inside the WordPress folder. If you run them from somewhere else, add the global --path option with the full path to your WordPress folder.
Update and audit with WP-CLI
Step 1: Back up the database and files
Never change users or core without a way back. Deleting a user can also delete their posts, so this step is not optional.
This command exports the whole database to a .sql file in the current folder:
wp db exportYou should see a line that starts with Success: Exported to and then a file name. If you do not give a name, WP-CLI uses the pattern {dbname}-{Y-m-d}-{random-hash}.sql, so the date is in the file name.
For the files, use your host's backup tool, or download a copy of the whole WordPress folder, including wp-content. Keep both copies somewhere other than the same server.
Heads up: a .sql file in your web folder can be downloaded by anyone who guesses its name. Move it out of the public folder, or delete it from the server once you have saved it safely.
Step 2: Update WordPress core and confirm the version
The release page says it is recommended that you update your sites immediately. So this comes before the audit.
This command updates WordPress to the latest version:
wp core updateYou should see lines like Updating to version and Unpacking the update..., and at the end Success: WordPress updated successfully.
This command prints the version that is now installed:
wp core versionAt the time of writing (23 November 2026), you should see 7.1.5. If not, read the full output of wp core update for a warning and check you are in the right folder.
If you stay on an older branch for a reason, the release page says the fixes were also released in older branches, for example 7.0.9, 6.9.12 and 6.8.13. It also reminds you that only the most recent version of WordPress is actively supported. Staying on an old branch should be a short pause, not a plan.
Step 3: List users by role
Now find out who holds the roles from the release page.
This command shows how many users have each role, one role at a time:
wp user list --role=contributor --format=count
wp user list --role=author --format=count
wp user list --role=editor --format=count
wp user list --role=administrator --format=countEach line prints a single number.
This command shows the details of every Contributor in a table:
wp user list --role=contributor --fields=ID,user_login,user_email,user_registeredYou should see a table with the ID, the login name, the email and the date each account was created. Run the same command again with --role=author, --role=editor and --role=administrator.
Quick tip: --format also accepts csv, ids, json and yaml. This command saves all users and roles to a CSV file:
wp user list --fields=ID,user_login,user_email,roles --format=csv > users-before-audit.csvKeep that file. It is your "before" picture, and it helps if you need to put a role back later. Treat it as private, because it contains email addresses.
Step 4: Review each account you do not recognise
Go through the list and mark each account as keep, demote or delete. Ask one question for each person: do they still need this role this month?
This command shows the full details of one user. It accepts an ID, an email or a login name, and here sample-author is a made-up example login:
wp user get sample-authorYou should see a table with that user's details, including roles.
What about the last login date? None of the default fields of wp user list is a last login date. What WP-CLI can show is the sessions WordPress has stored for a user.
This command lists the stored login sessions of one user, with login time, expiry time, IP address and browser:
wp user session list sample-authorYou should see columns named token, login_time, expiration_time, ip and ua. An empty table is a hint, not proof that they never log in.
Here is a made-up example to make this real. Say your list shows sample-author, an Author account created for a guest writer who sent two articles in 2024 and then moved on. That account can still upload and publish, and both Author+ fixes apply to it. Clear candidate.
Step 5: Demote accounts that should stay
A writer who only sends drafts does not need to be an Author.
This command changes the role of one user, here a made-up login alice, to Contributor:
wp user set-role alice contributorYou should see a line like Success: Added alice (12) to http://example.com as contributor. The number in brackets is the user ID, and the address is your own site.
Heads up: if you leave out the role, WP-CLI sets the site's default role, which you can see in Settings > General. Always type the role you want.
Even subscriber is not risk-free, since the page lists one Subscriber+ fix.
Step 6: Delete accounts nobody needs
Before you delete, decide who will own that person's posts and find their ID in your Step 3 list.
This command deletes sample-author and gives all their posts to user ID 2, an example value:
wp user delete sample-author --reassign=2You should see a line like Success: Removed user followed by the ID and your site address.
Why this matters: the WP-CLI page does not say what happens to posts without --reassign, so always pass it.
Step 7: End old sessions
A session is the record WordPress keeps after someone logs in, so they stay logged in when they come back. Ending a user's sessions logs them out, so any browser that was still signed in as that person has to log in again.
This command ends every session of one user:
wp user session destroy sample-author --allYou should see Success: Destroyed all sessions.
If you want a clean start for the whole site, this command from the official docs ends all sessions for every user:
wp user list --field=ID | xargs -n 1 wp user session destroy --allYou should see Success: Destroyed all sessions. once for each user.
Heads up: this logs everyone out, including you. Warn your team first so they save their drafts.
Step 8: Check and remove stale Application Passwords
An Application Password is a separate password tied to one user account, made for apps and scripts. The official docs say it cannot be used to log in to wp-admin through wp-login.php, but it can sign in to the REST API and, where enabled, XML-RPC.
Several account-based fixes involve the REST API or XML-RPC, so these passwords deserve a look.
This command lists one user's Application Passwords, with when each was created and last used:
wp user application-password list sample-author --fields=uuid,name,created,last_used,last_ipYou should see one row per password. The created and last_used values are Unix timestamps, meaning dates written as seconds.
This command deletes one Application Password by its UUID, which is the long ID from the list above, shown here as an example value:
wp user application-password delete sample-author 6633824d-c1d7-4f79-9dd5-4586f734d69eYou should see Success: Deleted 1 of 1 application password.
This command deletes all Application Passwords of one user:
wp user application-password delete sample-author --allYou should see Success: Deleted all application passwords.
Before you delete, ask who uses each one. Removing a password breaks any tool that depends on it.
The dashboard path
No SSH? You can do almost all of this in the browser.
- Update first from Dashboard > Updates, which is the path the release page gives.
- Go to Users > All Users.
- Use the role links above the table, such as Contributor or Author, to show only users with that role.
- To demote people, tick their boxes, choose a role in the Change role to dropdown, and click Change. You should see the message "Changed roles."
- To delete someone, hover over their row and click Delete. On the next screen choose Attribute all posts and links to, pick a user, and click Confirm Deletion.
- To check Application Passwords, open Users > All Users, click Edit on the user, and scroll to the Application Passwords section. Revoke the ones nobody uses.
Heads up: the other choice, Delete all posts and links, removes their content too.
A note for shared hosting
To run WP-CLI you need terminal access to your site, which many hosts provide through SSH or a web terminal. The command line may also use a different PHP than your website.
The WP-CLI install guide says that if you need a different PHP binary, you can put it first in your PATH, and that Composer and Git installs can use the WP_CLI_PHP environment variable instead. The exact path depends on your server, so ask your host.
How to check it worked
This command confirms the WordPress version:
wp core versionAt the time of writing (23 November 2026), you should see 7.1.5.
This command shows every user and role that is left:
wp user list --fields=ID,user_login,rolesYou should see only people you can name, with the role you chose for each one. Compare it with users-before-audit.csv from Step 3.
This command counts the stored sessions of a user you cleaned up, using the made-up login from earlier:
wp user session list alice --format=countIf you ran the session reset for everyone, you should see 0 for users who have not logged in again since.
In the dashboard, open Users > All Users and click each role link above the table. You should see the same people that WP-CLI showed, and nobody you planned to remove.
Troubleshooting
WP-CLI says it is running as root
Symptom: the command stops with Error: YIKES! It looks like you’re running this as root.
Cause: you are logged in to the server as root. The WP-CLI docs warn that any plugin or theme code would then run with full control of the server.
Fix: switch to the user who owns the site files and run the command again. If you do not know which user that is, ask your host.
The command cannot find WordPress
Symptom: WP-CLI stops with an error and does not seem to find your WordPress files.
Cause: a likely cause is that you are not in the WordPress folder.
Fix: move into the folder that holds wp-config.php, or add the global --path option with the full path to that folder.
WP-CLI cannot connect to the database
Symptom: you see Error: Can't connect to the database.
Cause: the database details in wp-config.php are wrong for the command line, or WP-CLI is using a different PHP than the website, which the docs mention for setups like MAMP.
Fix: run wp --info to see which PHP binary WP-CLI is using, then check the database settings in wp-config.php. On shared hosting, ask your host for the right PHP path.
PHP runs out of memory
Symptom: an error starting with PHP Fatal error: Allowed memory size of.
Cause: the command line PHP memory limit is too low.
Fix: the WP-CLI docs suggest raising memory_limit to 512M or higher in php.ini, or asking your host.
A writer or tool stopped working after the cleanup
Symptom: a team member says they cannot upload images, or a publishing app stops posting.
Cause: you demoted them to Contributor, which has no upload_files, or you deleted an Application Password their tool used.
Fix: check users-before-audit.csv and restore their role with wp user set-role if they need it. For a tool, create a new Application Password on their profile screen.
The deleted user's posts are gone
Symptom: after a delete, some posts are missing.
Cause: in the dashboard, Delete all posts and links was chosen instead of attributing the posts to someone.
Fix: restore the database from your Step 1 backup. This is the moment it earns its keep.
Pro tips and when to call for help
- Give each person their own account. Shared logins make it impossible to remove one person cleanly.
- Use the lowest role that still lets someone do their job. A guest writer is usually a Contributor.
- Check the default role in Settings > General. New accounts get that role, so it should be a low one.
- While you are hardening things, it is worth turning off the built-in file editor too. I wrote about that in how to turn off the file editor in wp-config.
- If terms like server, PHP and SSH still feel new, start with what web hosting is and come back here.
Call your host or a developer if you run multisite, if the update fails twice, or if you find an Administrator account nobody on your team created. That last one is no longer an audit task.
The one message worth forwarding
Copy this and send it to whoever manages your site:
Hi, WordPress 7.1.5 came out on 18 November 2026 with 20 security fixes, and several of them need a logged-in account to use. Could you please: 1) back up the database and files, 2) update to 7.1.5 and confirm with "wp core version", 3) send me a list of every Contributor, Author, Editor and Administrator, 4) demote or delete accounts we no longer need, with their posts reassigned, 5) remove unused Application Passwords, and 6) tell me before you log everyone out so I can warn the team. Thank you.Update first, then make sure every key to your site belongs to someone who still needs it.
Reader questions
Do I still need to audit users if my site updated itself to 7.1.5?
Yes. The update fixes the known bugs, but an old account can still be used against the next bug that nobody knows about yet.
Will changing someone's role delete their posts?
No. The set-role command only changes the role. Posts are only at risk when you delete a user, which is why you should always reassign them.
Can I undo a role change?
Yes. Run wp user set-role again with the old role, which you can find in the CSV file you saved before the audit.
Does ending sessions change anyone's password?
No. It logs the user out, and they can log in again with their normal password. Change the password separately if you think it has leaked.
Is the Subscriber role completely safe?
Not completely. The 7.1.5 release page lists one Subscriber+ fix, so even Subscriber accounts should belong to real, current people.
I am on an older WordPress branch. Am I covered?
The release page lists fixes for older branches, such as 7.0.9, 6.9.12 and 6.8.13, but it also says only the most recent version is actively supported. Plan to move to the latest version.
Was this guide helpful?
Help us make the next update better.
Sources & further reading
Originally published . About our editorial updates.



