Change Domain Properly & Safely

Hello! I just bought a new domain for my forums, I was wondering how can I safely change my domain over without breaking anything? I saw a few tutorials here and there on the forums but they're bits and pieces or not very descriptive, is there a tutorial out there that anybody would recommend?
Thank you!

Edit: When I go to conf_global and change the URL there, it works although there's a lot of broken aspects. Is there a fix for this?

Nevermind, I reloaded my cache on my theme and flushed cache on Cloudflare and everything works perfectly and old URLs automatically redirect to the new ones so no links to posts got broken.

Please be sure to take a backup of your database before running any manual queries.

Edit ibf_ to your prefix or remove if your not using one.

UPDATE ibf_posts SET post=REPLACE(post, 'OLD URL', 'NEW URL')

Or...

The next thing you will need to do is export your website’s database. You can easily do that using a database management tool like phpMyAdmin. To find which database your website uses, open the file called conf_global.php. You can find the name of your database on the following line:

$INFO[‘sql_database’] = ‘database_name’;

The text between the second quotes will be the name of your database.

The next step is to create a new MySQL database. Login to your cPanel and find the MySQL Database Wizard icon. Simply enter the details for your database and its users. Once you have created the MySQL database, head to phpMyAdmin and import the previously exported copy of your site’s database.As a final step, you will need to open the file conf_global.php with a text editor like notepad. The file is located in your IPB root directory. Find the following lines and edit them with the MySQL details that you have created earlier: