At times you may mistakenly change the URL in WordPress dashboard and when you do this not only will your site not load correctly but you will also lose access to your login page making it impossible to correct the URL. This fortunately is an easy fix.
Fixing The WordPress URL In The Database
First login to your cPanel and find PHPMyAdmin.

Once you are in phpMyAdmin in the left hand menu you will see database names, click on the database for your site to expand the database and show tables.
Hint: If you are not sure of your database name you can find this in your website directory in the file wp-config.php
The table you want is X_options (X will be replace whichever prefix was used when the databse was created), click on X_options. This will open a window on the right hand. Find X_options table on right hand side and click "Browse".

Once you click browse you will see all the rows in the table, we want to edit the first two rows where you will see your URL is set.

Click on "Edit" and change the URL as you need. Once done click "Go" in bottom right hand corner.
That's it, your URL is changed and your site and dashboard should now be accesible.
