Symptoms

Changing the cPanel primary domain to its www version breaks the WordPress Installation.

 

Description

When changing the domain, either an addon or a primary domain with its www subversion, the files for the WordPress installation are moved to the www.domain.tld folder inside the main domain's root directory, but the domain is not changed in the WP-Squared interface. This breaks  both versions non-www and www,

We've opened an internal case for our development team to investigate this further. For reference, the case number is CPANEL-49088. Follow this article to receive an email notification when a solution is published in the product. 

 

Workaround

The workaround is to move the files manually back to the original folder or restore a cPanel full Backup.

Backup Restoration

Also, if you'd like to add www to the WP installation, the correct method is from "WP-Admin / Settings / General."

Simply update "WordPress Address (URL)" and "Site Address (URL)" by adding the www  to the domain's URL. Example: https://www.yourdomain.tld

 

 

 

Additional resources

Can I change the document root for www.domain.tld?