Rebuilding cross-references



Cross-references are a feature of ALP that provides a list of links to and from posts and pages that reference and are referenced by each post or page. This is especially useful in a labbook context where the history of posts on a particular topic can be tracked simply by following the link tree.


Cross-references are regenerated whenever a post or page is created or edited. Occasionally the cross-references might become out of sync if the ALP plugin is disabled while a post or page is created or edited. In this case, cross-references 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=

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;


> $ssl_alp->references->rebuild_references();

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


Linked from


# Date User Information
217 months agoSean Leavey(current)
167 months agoSean Leavey(original)