The other day I was moving one of my new websites to my other server so that I can fully test it and make some changes to the site, all went smoothly and good. As we are using HTTPS across all of our iTechnixNetwork websites, I decided to change the URL to HTTPS via my WordPress admin dashboard so that by default website will load secure version whenever anyone visits that website.
So for this, I logged into my website admin panel then navigated to Dashboard -> Setting -> General, but there I found out that I am not able to change the WordPress Address (URL) and Site Address (URL) fields as they as disabled or grayed out.
This usually happens when you move your website but forget to delete some codes or sometimes some themes come with some codes which disable this setting, solution of this problem is very simple, you just need to delete some lines from your WordPress files and you are ready to go.
First login to your FTP client and navigate to the folder where you have installed WordPress, now we have to edit your wp-config.php file*. Once you have opened the wp-config.php file, look for below mentioned two lines.
Once you have found these lines, either delete them or just comment them out, and you are done, refresh you General setting page and you should be able to edit those fields.
Still not able to do so? Try this.
Sometimes themes come with some code which also disables these fields, to solve this, you have to open function.php file of your theme and look for below-mentioned lines.
Again, either delete them or just comment them out, and you are done.
[*] wp-config.php files is a very secure file which contains sensitive data of your websites, edit it at your own risk.