You would first need a plain-text editor capable of saving a file with .htaccess as its extension and no actual filename. Notepad++ is what I use: https://notepad-plus-plus.org/
In the code I have posted, you would use Ctrl-H to hunt-and-replace all instances of example.com
with your own domain, and you would do the same with subdirectory
to blog
if that is where your installation is actually located. Then at that point, you would save the edited code as .htaccess
and have it handy for upload to your public “root” folder where your domain lands and gets further direction before ever going to ‘https://www.mywebsite.com/blog’.
With the above ready to go, you would go to Settings > General and change ‘https://www.mywebsite.com/blog’ to ‘https://www.mywebsite.com’ in both boxes, then use cPanel > File Manager or an FTP/SFTP connection to place your new .htaccess file in place and you will be done.
If you are wary of doing that yourself, a Support Tech at your host might be willing to take a look at this thread and do that for you unless you might prefer to find help outside of these forums or ever hire someone to do the work.
Following the above, your database *might* need a little more updating via cPanel > phpMyAdmin and you *might* have a plugin (such as BulletProof Security) that might (but I doubt) need to be uninstalled and re-installed so can it re-establish its recognition and use of the changed URL and ‘absolute server path’.