WordPress cannot relicense; it’s a fork of a GPL project originally (b2) and there is no copyright assignment, so you would need explicit permission from every contributor including the forked project’s.
Further clarification: the project can be relicensed under a compatible license. This approach would mean that new code is released under the new license, such as the AGPL, while the existing code remains under the GPL. It's a little complicated but quite doable.