LATEST >>

Welcome Here And Thanks For Visiting. Like Us On Facebook...

EXEIdeas – Let's Your Mind Rock » WordPress / WordPress Tricks » How To Change The Site URL Without Logging In WordPress?

How To Change The Site URL Without Logging In WordPress?

How-To-Change-The-Site-URL-Without-Logging-In-WordPress
WordPress is easy and hard too if you are a newbie. If you installed your WordPress in a folder of your hosting then you added a Adds-On domain on it then your WordPress will stop working as when you installed it then it will have different URL in WordPress Address (URL) & Site Address (URL) so you have to change these URLs with your newly adds-on domain but now you will not be able to change it as you will be not able to login.

But you don’t have to worry as there are many ways to change it without logging in so through following those ways you will be able to login then change the URL with your current adds-on domain. You can also read these ways on WordPress Codex pages at Changing The Site URL. Now without any more preface, follow the below shared steps and gain access.

How To Changing The Site URL Without Logging In WordPress?

There are many ways so we will ry one by one and if any one of below is working then don’t follow other ways.

Change The Site URL Without Logging In WordPress

1.) Official Way:

If you have access to your WordPress admin dashboard through login then you may be able to make the change to the URL right there. Now open Settings >> General. Then modify the WordPress Address (URL) & Site Address (URL) values with your adds on domain that you aded on this installed WordPress folder.

2.) wp-config.php Way:

If you are not able to access through upper way then you have to do the following. Now go to your FTP and open your folder where you installed this WordPress blog. Now find wp-config.php and edit it and add the below lines in the end of file and save it.

define('WP_HOME','http://new-adds-on-domain.com');
define('WP_SITEURL','http://new-adds-on-domain.com');

Now go to your login via new adds-on domain and login to your WordPress dashboard.

3.) function.php Way:

If you are not able to access through upper ways then you have to do the following. Now go to your FTP and open your folder where you installed this WordPress blog. Now open /wp-content/themes/CURRENT-THEME-Folder/ folder and find function.php and edit it and add the below lines in the end of file and save it.

update_option('home','http://new-adds-on-domain.com');
update_option('siteurl','http://new-adds-on-domain.com');

Now go to your login via new adds-on domain and login to your WordPress dashboard.

3.) DataBase Way:

If you know how to access phpMyAdmin on your host, then you can edit these values directly to get you up and running again.
1.) Backup your database and save the copy off-site.
2.) Login to phpMyAdmin.
3.) Click the link to your Databases.
4.) A list of your databases will appear. Choose the one that is your WordPress database.
5.) All the tables in your database will appear on the screen.
6.) From the list, look for wp_options. Note: The table prefix of wp_ may be different if you changed it when installing.
7.) Click on the small icon indicated as Browse.
8.) A screen will open with a list of the fields within the wp_options table.
9.) Under the field option_name, scroll down and look for siteurl.
10.) Click the Edit Field icon which usually is found at the far left at the beginning of the row.
11.) The Edit Field window will appear.
12.) In the input box for option_value, carefully change the URL information to the new address.
13.) Verify this is correct and click Go to save the information.
14.) You should be returned to your wp_options table.
15.) Look for the home field in the table and click Edit Field. Note There are several pages of tables inside wp_options. Look for the > symbol to page through them.
17.) In the input box for option_value, carefully change the URL information to the new address.
18.) Verify this is correct and click Go to save the information.

Theme Files Editing Warning:

Keep in mind that every code that you will add in your themes files will be removed when you will change the theme. So after changing your theme, you have to follow this article again and you will get everything back same as it is now.

Last Words:

This is what we have and shared in easy steps for newbies so that they can easily know how it works. Stay with us because we are going to share a whole guide step by step about WordPress and make it easy for you. If you liked it then share it and be with us to get next tutorial. If you have any problem then feel free to ask us. We will help you with what we can or have.

You Like It, Please Share This Recipe With Your Friends Using...

2 Responses to “How To Change The Site URL Without Logging In WordPress?”

  1. Happy ValentinesDay says:

    thanks dude it helped me a lot

Leave a Reply

Your email address will not be published. Required fields are marked *