Rebuilding coauthors

Contents

Coauthors

Coauthors are a feature of ALP that provide users with the ability to mark other users as coauthors of their posts. This makes the posts show up on the archive page of each author, and count towards their post counts, and in the case of Interns, allow them to edit the post.

Rebuilding

Coauthor terms are generated whenever a user is created or edited. Occasionally the coauthor terms might become out of sync if the ALP plugin is disabled while users are added, removed or edited. In this case, coauthor terms can be rebuilt using the Tools page or using a special command executed with WP-CLI.

For large sites, it is recommended to run the command via WP-CLI. This avoids the potential issue that, due to the server configuration, the web request on the Tools page times out during the operation – potentially corrupting the references. In order to do this, ensure you have installed and configured WP-CLI, then open a terminal on the server and run:

$ wp shell --path=/path/to/wp/installation --url=https://example.com/blog-name/

replacing the path and url variables as required on network sites. This will open a PHP shell, into which you should type:

> global $ssl_alp;

Then:

> $ssl_alp->coauthors->rebuild_coauthors();

On large sites, this will can take many minutes to execute. Once the prompt cursor returns, type exit to leave the prompt.

History

# Date User Information
150 2 years ago Sean Leavey (current)
133 3 years ago Sean Leavey
132 3 years ago Sean Leavey (original)