Archived topic
Changing Sites Domain Name
13 replies · Started by Dan King on November 30, 2022
Hi
I'm trying to change the sites domain name but in general settings it's greyed out?
WordPress Address (URL)
Site Address (URL)
Thanks as always,
Dan
Hi Dan,
Not sure if I fully understand.
GP (or any themes) does not have any control over the URL side of things.
Let me know if I'm missing something here :)
Yes you’re supposed to edit the function.php file but when I download that there’s a message from Generate Press saying do not edit this file…
Thanks Dan
You are definitely not supposed to edit function.php.
The theme really has nothing to do with the URL - it doesn't know what URL it is attached too.
Are you having any specific issues after changing the Domain name?
Hi
Yes it should be really easy to do... but in Wordpress it's greyed out:
https://www.loom.com/share/2ca94321653047c4828094e19cd32a94
Thanks as always for your help and support.. life savers!
Dan 🙏
I did change the fucntion.php file and now i am getting this error message...
There has been a critical error on this website. Please check your site admin email inbox for instructions.
Learn more about troubleshooting WordPress.
whoops!
Can i reinstall the theme to fix it?
https://www.loom.com/share/2c9942a988524c17abf35aa061d1eaae
Sorry about this...
Dan
I deleted the theme and reinstalled in and i am still getting the error message...
What have I done? 😭
Dan
Okay so I have deactivated all my plugins and it's the woocommerce plugin that is causing the issue... sorry this is probably now way out of your remit.. i'll try and figure it out myself - but just incase you have a simple fix:
Greyed out site urls generally mean they have been hard coded in your wp-config.php or another plugin has changed them.
If the site is returning critical error when enabling a plugin like Woocommerce then remove any custom snippets you have added to the site and disable any Woo related functions in a GP Element.
Hi David,
Gosh what an idiot.. i've deactivated custom snippets, and GP element...
https://www.loom.com/share/6772a26075c9421691da534ca1e2d401
But it's still causing an error...
Grrrrr shoot me.
Dan
The Woo products are saved in your database, so check with Woocommerece as you should be able to re-install the plugin without affecting that.
Also try disabling the GeneratePress Elements module in case there is some rouge code in an element.
Worse case scenario - ask your Host to install a backup before the issue occurred.... and then stop editing functions.php anywhere :)
Omg I fixed it... i even found the functions.php file i thought i edited but i hadn't? lol
It was the woocommerce payments plugin... thanks for your help it's incredibly comforting to know i have someone to ask... so thank you!
Oh and i now have a staging site and have the site backed up! LOL
Dan
Awesome - glad to hear you found the issue :) And please stop editing functions.php unless its the one in your child theme lol