Fix Godaddy sub-domain forwarding for wordpress

I created a wordpress website with its own domain name on my Godaddy account. However, after that domain name expired, I still want to archive the website content as a sub-domain of my account. Then, I created a sub-domain under my main domain name (see and as examples). But after I created those sub-domain names and select the correct site folders, the forwarding don’t work. They still linked to the old domain name.

To fix this, I did followed my own post at

By adding these two line of code in config.php


Now everything is working correctly ^_^