WordPress – Changing the Site URL and Home Settings

If you need to migrate your WordPress site or change the domain name or location of your WordPress installation it’s good to keep in mind how WordPress keeps track of itself via the WordPress Address and Site Address settings. Click here to learn more about WordPress Hosting.

These settings can be adjusted directly in the WordPress admin dashboard from Settings >> General or you can make these modifications to wp_options table in the database.

In this article we will touch on the following:

WordPress WP_HOME and WP_SITEURL settings

There are 2 WordPress options that you can adjust to change the behavior of how WordPress works.

  • WordPress Address (URL) / WP_SITEURL: The address where your WordPress core files reside.
  • Site Address (URL) / WP_HOME: The address typed in a browser to reach your WordPress blog.

 

WordPress Address (URL) / WP_SITEURLSite Address (URL) / WP_HOME
cPanel File Manager showing WordPress core files
Web browser showing WordPress site URL setting

 

WordPress URL settings in admin dashboard

As you can see from the example above, I have my WordPress core files stored inside my /public_html/wp directory so that they aren’t clogging up my root directory.

However I still want people just to type in https://www.example.com to get to my WordPress site, so I’ve left that set as my Site Address so WordPress knows this is what I want displayed instead of the core files location.

This is just one example of what can be done with WordPress URL settings. You might also need to modify these settings after moving your WordPress website to a new server, or testing a new structure for your website.

Change WordPress address in admin dashboard

You can also adjust your WordPress URL settings directly from the admin dashboard. This method will typically work if you haven’t moved your WordPress installation and aren’t having any issues access it.

  1. Login to WordPress admin dashboard
  2. Click on Settings >> General
  3. Fill in your WordPress Address and Site Address and click Save.

Be aware with these settings in the wp-config.php file, the ability to modify them from the dashboard is lost.

  1. Edit your wp-config.php file.
  2. Define your WP_HOME and WP_SITEURL settings by inserting these lines towards the top:
    define('WP_HOME','https://example.com');
    define('WP_SITEURL','https://example.com');

Change WordPress address directly in the Database

You can also directly modify your WordPress URL settings in the WordPress database using the phpMyAdmin tool.

  1. Backup your database in cPanel prior to making changes.
  2. Use phpMyAdmin to manage your WordPress database.
  3. phpMyAdmin select WordPress database
    Select your WordPress database from the left.
  4. phpMyAdmin select WordPress options table
    Then select your wp_options table.

    Your wp_ prefix may differ depending on your install settings.

  5. phpMyAdmin click edit on siteurl

    Click Edit beside either the siteurl or home entries.
    You may need to search for them with the Filter rows function at the top.

  6. phpMyAdmin update siteurl

    Enter in your new value in the option_value field, then click Go.

Detect and change WordPress address with RELOCATE

If you’re having issues accessing your WordPress dashboard, you can have WordPress automatically try to figure out what the correct WordPress Address should be using the RELOCATE flag in your wp-config.php file.

With the RELOCATE flag set, WordPress will automatically update your WordPress core files path to the URL used to attempt to access the wp-login.php script. This only affects the WordPress dashboard and not the site itself.

  1. Edit your wp-config.php file.
  2. At the top of the file add a define(‘RELOCATE’,true); line:
    define('RELOCATE',true);
  3. Now visit your https://www.example.com/wp/wp-login.php page in your web browser.

    Be sure to type in the path of your WordPress core files before wp-login.php

  4. Log into your WordPress dashboard as you would normally.
  5. If you navigate to Settings >> General, you should now see that WordPress has automatically populated the WordPress Address (URL) field for you, with the path to your WordPress files.

Looking for more guides? We have over 400 WordPress How To Articles to help you!

IC
InMotion Hosting Contributor

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

256 Comments

  • Thanks for this article. It helped me resolving the redirect URL issue with updating Database . It worked and saved my time

  • Your info helped me out today. Just want to say thanks. Still can’t do what I want though. Trying to get WP root to redirect to a page (showing categories) rather than most recent blog posts.

    • The structure of WordPress is meant to work a certain way, BUT you can choose what you’re displaying on the front page. I would recommend that you change the front page to display a STATIC page (instead of blog posts), and then create a page with links to your categories. That will give you what you want.

    • The structure of WordPress is meant to work a certain way, BUT you can choose what you’re displaying on the front page. I would recommend that you change the front page to display a STATIC page (instead of blog posts), and then creat a page with links to your categories. That will give you what you want.

  • Hi John,

    Thanks for reply, previously i tried ti rname the .htaccss file but server i not regenrating this file, is there any other way to clean cache and regnerate .htaccess file.

    Thanks

    • You can always create an .htaccess file from scratch using a text editor. If you want to create a default WordPress .htaccess file, you can simply search for the “default wordpress .htaccess” and then copy those entries into a blank text file and name it “.htaccess” .

  • 	`define('WP_HOME','https://example.com');
    	`define('WP_SITEURL','https://example.com');
    

    These hold the same value.

    If I wanted files in `/wp`, but address bar to show `https://example.com`,

    Which wp-config constant should be changed to `https://example.com/wp` ?

    And is this answer consistent with the pic ?

    <pre>
    site_url() siteurl Website Address example.com/wp

    home_url() home Site Address example.com

    </pre>

    but I’ve not found a consensus as to which of those rows ~ `WP_SITEURL`

    and which of the rows is ~ `WP_HOME`.

    The few websites that give an example for wordpress in its own address..

    AND show what the corresponding wp-config settings would be,

    contradict each other on which one is WP_SITEURL vs WP_HOME.

    And usually, they even contradict themselves in their own post !

    ..or revert to a wp-config example where all they all hold the same value.

    Most every reference I’ve found (including wordpress.org) only

    show examples where everything is set to the same value, so it’s

    not possible to map:

    the function to

    the database to

    the php constant

    to the Settings Label!

    Please shed insight. Thanks.

    • My understanding (from reviewing wordpress.org documentation) is that the WP_HOME value would be where you could specify the URL that the website can be reached at. Then you would have WP_SITEURL to specify the location of the WordPress website core files.

  • i bought a new domain name and changed it via dashboard settings but its not ready yet and now im completely logged out and just says cant be reached. i try putting in the old domain name but changes to new.

    How do i undo it all until my new domain name is ready??

  • Thanku very much…i could recover my home page, however im not able to view all the other pages that i’ve created..Do i also have to change those urls in wp-options?

    • You should not have to change it. Make sure that your permalink settings have been reset as well and clear your browser cache. If the problem persists, contact your host technical support team (IMH live technical support contact can be seen at the bottom of this page).

  • This was a great article with lots of good examples and the explanation is awesome.

    This is really helpful to used my business site development.

    Thanks,

  • None of this was in the least bit helpful.  All I did was change a setting of my url in the admin and I even changed it back to what it was I thought and my website loads all wrong now with blue text and no images.  How could wordpress freak out so severly?

    • Sorry to see you are experiencing issues with changing the WordPress URL. The unexpected behavior can not be explained based on the details you have provided. If you have a backup of when the site was working as expected, I recommend you restore that version and then attempt to follow the steps for using the wp-config.php file to make this change.

  • Great Article. But I have a problem. I want to change my domain from jesus-mein-retter.de to www.jesus-mein-retter.de
    If I add the www to the WordPress Address as well as to the SiteAddress, the page is not longer available. I have to delete the www from the database in order that the page loads again correctly. The domain will be redirected internally to my WordPress directory (WordPress) from my controll panel within my hosters settings panel (my hoster is Strato).
    Do you know, what the problem could be?

    • The most common causes of that issue would be hardcoded URLs in a plugin or theme that need to be manually changed to match the new URLs set in the dashboard, a redirect issue in the .htaccess file, Or the old URLs being cached in your browser, the site cache, or any serverside caching that may be on your server.

  • Hi, it helped me a lot, thank you.

    I am using the method 2 with RELOCATE. If I do this.. do I also have to change something directly in my database? Or is my connection to database not affected by changing my WordPress core files path?

    • Hello,

      You do not have to change anything in the database. The database connection settings remain the same. The only time you would have to worry about it is if you’re changing servers and moving to a different MySQL database.

  • To whom it may concern

     

    Hello,

     

    I read the steps above but I’m really not familiar with php, database, ftp, etc.

    Here is my problem :

     

    I tried to fix an error leading to a blank page when openin Elementor (WordPress plugin). Now that I want to login to mydomainname.com/wp-admin, I get the “Error page not found” and the following url : https://www.mydomainname.com/wp-admin/wp-login.php?redirect_to=https%3A%2F%2Fwww.mydomainname.com%2Fwp-admin%2F&reauth=1

     

    Any idea of how i can fix this?

    Thanking you in advance,

     

    Mae

     

    ps: I wrote this message in the wrong forum category so don’t be suprised if you see it there : https://www.inmotionhosting.com/support/website/managing-files/how-to-edit-a-file. 

  • Hello,

    I’m having some issues with this process. Can you only change your site URL and address once you make it live?

    Right now we have a live website and are creating a new WordPress website in a subfolder. We want to make it live soon. We have also changed our company name so the URL will be completely different (we have already purchased the new domain name). However, when I try to change the URL and address as outlined in the video above, my WordPress site crashes. I can no longer log in, as it just keeps trying to reload and finally tells me that it can’t connect because it’s taking too long.

    So, do I have to wait until we make our new site live to change this information? 

    Thank you!

    • When you change the URLs in your dashboard all of the redirects and URLs generated in WordPress will start using that domain so that site needs to be able to be accessed with that domain or it will not work.

  • I am in a dilemma. When I tried to speed up my website I changed its URL from www to non-www but my website has lost all the icons. It is now showing only squares. I need your help please reply if you have any tricks. 

  • At the top, the first listings are mistakenly reversed and will confuse people:

    “WordPress Address / WP_HOME” should be: WordPress Address / WP_SITEURL

    and

    “Site Address / WP_SITEURL” should be: Site Address / WP_HOME

  • Hi there, Im having issues in links of FTP and WordPress..first i make a basic html and upload thrugh FTP after sometime i convert that website in using wordpress..now the issue is that the links of those html files and folders which i uploaded in FTP is now not working.just new links are working.The Error is “No Page Found” is there any tool, plugin or way to make alive those FTP Html links??please help me in this issue

    • In order to have your HTML website display instead of the WordPress website, you will need to specify which file to load by default. You can do this in your .htaccess file, by following the steps in our guide on How to Change your Default Index Page in .htaccess. By default, WordPress loads the index.php file. In your .htaccess file, you will want to use the original HTML file that you uploaded via FTP.

  • Recently updated woocommerce version 3.3. than shows site url and other link https://shopnobari.com/?v=87a47565be47 , https://shopnobari.com/blog/?v=87a47565be47 Why show this. any one can help me how solve this issue. Specially requiesting to Jacob Nicholson to help me solve this isuue. 

    note: I have checked  above tutorial guide but not solve.

    Thanks

    • Sorry for the issue with your URL. Jacob is no longer with this company. In regards to your issue it appears that you don’t want the URL with the query (the “?v=87a47565be47” portion of the URL) to show. This can be changed using friendly URL settings. We don’t have an article regarding WooCommerce for that issue, but you can reference this article in regards to building a proper URL for WooCommerce. You may also want to check out this post concerning a plugin that alters the WooCommerce URLs. Hope that helps!

  • I installed wordpress.  I can either access internally via lan or externally via mobile.  If set on LAN ip for the server, I my mobile won’t work correctly connecting to the site.  If I set the IP for the real world IP I can connect just fine from mobile, but I can’t connect internally from LAN!   My other webpages on the server do NOT have this issue!

  • Can i use site url different from home url, is it possible? if possible please help me to do so
    eg. my wordpress home url is https://www.test.com/test/ and site url is https://www.example.com

    • As long as the domain is pointed to that server, then you should be able to change the URL to use that domain name as per the tutorial instructions above. If you’re not sure about your domain name, then you will need to speak with your host or the domain registrar that you have used to register the domain name.

  • Hi, thanks for this video. It is very clear and helpful but I think you have missed one obvious step out for people. Right at the start you do not mention (I didn’t hear you mention it sorry if you did) anything about the actual domain ownership and settings that need to be in place before someone adjusts the domain in WordPress. Can you add in your article that to make these domain changes the admin needs to make sure they own the domains and have pointed the DNS settings to the host and it can take up to 48hours to ensure all DNS has swapped over. Because without this info someone changing the settings you show will not see any effects.

    • That’s implied. You changing the Site URL and Home for WordPress can only be done to sites you own. Changing it to a domain name you do not own will break the site.

  • i got some problem here, firstly i do fix wp-option on phpmyadmin but it still no effect

    then i just do relocate, and it works, i can go to my admin dashboard.

    but my website still on www.ds.redknot one. even i change setting > general > and i write ds.redknot.one then saved it but my homepage still www.ds.redknot.one

    i write on wp-config :

    define(‘RELOCATE’,true);
    define(‘WP_HOME’,’https://ds.redknot.one’);
    define(‘WP_SITEURL’,’https://ds.redknot.one’);

    still no effect

    can you help me ?

    i want to cry about this because i just make a long landing page. 🙁

    • When I go to https://ds.redknot.one/ I am not redirected to www. If you are still being redirected to that you may want to try clearing your cache. You can also redirect https://www.ds.redknot.one/ to https://ds.redknot.one/ so anyone who goes to the www. is redirected on loading however it looks like you do not have a dns record for www.ds.redknot.one yet so you would need to create one to redirect to the https://www.ds.redknot.one/ to https://ds.redknot.one/ .

  • i followed the above method but now if i want to viewmy site i must add a page name mannualy,

    my ulr is vostemehomes.co.ke

    to view the site i must add either page manualy

    eg vostehomes.co.ke/home/

    • Yes, this article is about how you can change the site’s main URL. Is that not the result you were hoping for?

  • Hello,

    I just set up a blog on this king of url : www.mywebsite.com/testblog

    Now I would like to rename the URL like : www.mywebsite.com/blog

    Do you know if changing wordpress adress in admin dashboard is enough to make it works ?

    Should I do like that ? And is it enough ? I m scared to loose some datas.. 

    WordPress adress : www.mywebsite.com/testblog

    Site adress : www.mywebsite.com/blog

     

    Thank you for your help

    • You will need to make some of the basic file modifications mentioned in the article above. If you follow the instructions provided, you should be fine.

  • Good day,

    The url is the following:

    https://carpetsolutionsonline.com/wp-login.php?redirect_to=http%3A%2F%2Fcarpetsolutionsonline.com%2FCarpets%2Fwp-admin%2F&reauth=1

    Now I would like to suggest if possible to reinstall wordpress so that I can restart working on this website,as it was my second day working on it and acctually I was only installing plugins and templates.There was no content at all. I still can log in my host cpanel but can’t for wordpress dashboard.

    Best regards,

    Gviateur.

  • Good day again,

    The antivirus error has been solved now,but I’m still seing this error:

    404: Page Not Found – This page does not exist 

    Any one can support?

     

    Best regards,

    Gviateur.

  • THANK YOU FOR YOUR TIMELY HELP.

    This is the feedback I’m getting after following what you had requested. I have Kaspersky on my PC. Now what ca I do next? Are there some settings in Kaspersky to deactivate before doing this or something else wrong?

    Error in Processing Request

    Error code: 499

    Error text: Request has been forbidden by antivirus.

     

    Best regards,

    Viateur.

  • Yesterday I registered a primary domain as tablets.com and installed a wordpress website with a site adress Url: tablets.com/tablets

    After realizing that I need to change the site adress url into tablets.com, I have edited the adress url through settings>general and after saving changes, I can open the domain but can’t access the Admin url.The displayed message is 404: Page Not Found – This page does not exist.

    The WP dashboard has automatically signed me out and signing in back is not possible.

    Any help would be very appreciated.

     

    Best regards,

    Gviateur.

    • I would suggest following the database method above and making sure your SITE URL and HOME are set correctly.

  • Hi All, Im very new to Worpress. I haven issue with js file. Normally my webiste was HTTPS but js file is http, When i submit a form im getting in console

    “Mixed Content: The page at ‘https://test.com’ was loaded over HTTPS, but requested an insecure script ‘http:198.168.4.5/test/js/.js’. This request has been blocked; the content must be served over HTTPS. in wordpress”

     

    Can one please help to sort out this isssue. 

     

    Thanks!

    • You need to look at how the form is calling the JS in the page. You may need to look into the plugin itself or where the files are for the form and make sure it uses HTTPS to request the JS file.

  • Hi Jacob

    Thank you very much for helping me get my site back online. I really appreciate it a lot.

    Regards

    ZER011NE

  • Hello,

    I cannot access my wordpress site due to me changing the url in general settings. I can’t even access the login page. I also don’t have access to my host information anymore. Any suggestions?

    • You do not need to login to the dashboard for most of the options above, but you will need access to the host/file system. I recommend reaching out to your host to regain access, then you can correct your site URL.

      Thank you,
      John-Paul

  • Hello,

    I followed the steps above to change my site address to be different from my wordpress address and my site is throwing a 404. I’m not sure how to fix this issue.

    My site wordpress site is located at: https://www.thepowdergroup.com/tenwords/wordpress/

    and I want to change the site address to: tenwordsbook.com 

    any help with this would be appreciated.

    Thank you!!!

     

    • As long as the domain is pointed to the correct directory folder, then the site should display.

  • Thank You so much !

    after changing URL I got ” too many redirects error” and the page disappeared , and Your solution to make changes through php file worked like a charm ! …and propbably saved me a lot of work.

  • Thanks alot,

                     I have facing some real issue with my wordpress login. Thanks for sharing it. 

    I love your blog.

    • Hi, Nice video… except the script is so small in the normal view and if I make your video Full Screen the script is too blurred to be clearly visible.

    • Hello [email protected],

      I will mention it to John Paul. The information you are seeking is in the article above. If you have any further questions or comments, please let us know.

      Regards,
      Arnel C.

  • I changed my URL and site address in the settings page and now when I search for my site I am given an error 404 message. Any idea how to remedy this and find my site again??

     

    • After you update your site, you need to let Google know. You will want to request a recrawl so they can update the links.

  • I built a WordPress site using a subdomain (nov.website.com), but I want visitors to only see the primary domain (website.com) as they navigate. I don’t mind signing in to the subdomain dashboard to make changes.

    I followed the instructions of copying all content from nov.website.com to website.com, and changing the “siteurl” to website.com.

    The problem is that now, everytime I go anywhere in the dashboard, it keeps asking me to sign in, as if I’m not in the correct website.

    What should I do?

    • If all files are in the primary domain name area, using the instructions above regarding editing the wp-config.php file should work for you. Remember you will need to manually change any hard coded links you have on your site to the new domain name.

    • Hello Lyricspoints,

      You will need to create a 301 re-direct that points your old URL to the new one that you want to use. However, if you want it really easy, use a plugin like this one: Simple 301 redirects.

      I hope this helps to answer your question, please let us know if you require any further assistance.

      Regards,
      Arnel C.

  • We migrated our new wordpress site from its own directory into the public_html folder, following these directions.  The site works properly and we were initially able to login to the dashboard;  but now  — on trying — we are being asked to log into WordPress and then caught in an endless Prove you are a Human loop.  Any suggestions?

  • Suggestions dont work. WordPress is terrible. Updated IP using relocate option and hard coding in wp-config. Worked once, then IP changed, so updated again but it sticking with the old one even thouh this is NOWHERE in the config or settings. Pretty lame.

  • Hi there,

    I followed the steps on moving the website from sub to root.

    did everything now having two issues.

    Pictures arent loading , www.k2resourcez.com

    and wordpress dashboard is not displaying properly and if i open any other link from dashboard it gives 404 error.

    Tried to edit wpconfig/ links from php/functions.php file. 

  • Hi

    I have a problem with my website. I changed my web hosting company after that I am facing this issue.

    When I update the website index.php is lost after that website going to down I replace the index.php

    It works fine what is the issue? Please help me.

    Thanks and regards,

    puwa

    • Puwa, I’m sorry to hear that your’re having trouble. Unfortunately, the problem is not clear. Are you referring to the content of your site, or the URL in your web browser’s address bar?

  • I have a problem. There is no WordPress Address (URL) & Site Address (URL). Settings. I have second instalation and there everthing is fine…  Please help.

     

    • If you are not able to set them in the Dashboard, try setting it in the “wp-config.php file” directly in the database, or with the “Relocate” flag as described above.

      Thank you,
      John-Paul

    • I recommend changing your URL back, directly in the wp-config file (as described above). This should override the setting in our dashboard.

      Thank you,
      John-Paul

  • Hello, I was playing around with my wordpress.org site, testing out features, when I accidentaly on purpose changed the wordpress site URL. Now I can’t access my site anymore, it used to be 45.62.252.113, but now it just redirects me to some emtpy page titled https://csgo-crate.com/wp-login.php?redirect_to=http%3A%2F%2F45.62.252.113%2Fwp-admin%2Fusers.php&reauth=1.

    Is there anyway to fix this?

    I don’t have wordpress installed on my device, what do I do?

  • Thanks, yes, I’m aware of this setting, but this setting is pretty much manual, as each time when uploading new installation I need to change that manually in the wp-config. I’m looking for something automated, like this:

    define(‘WP_SITEURL’, ‘https://’ . $_SERVER[‘HTTPS_HOST’]);

    define(‘WP_HOME’,    ‘https://’ . $_SERVER[‘HTTPS_HOST’]);

    but so far I couldnt figure out how to add www-prefix to this variable

  • Hello, how do I setup my wp-config file in a way, that by default it changes my site url to httpS and adds WWW prefix?

    At the moment default setting is https://example.com, I would like it to be https://www.example.com by default when I install wordpress. Is that possible?

    Thanks!

    • Yes. just use the instructions above for the wp-config file and just add www into your domain name. You can use https as well as long as you have an SSL certificate installed on your domain.

  • Hi! i use cloudflare flexible ssl everything ok but i still see my wordpress url and site url http still not https please help

  • Hi,

     

    I changed my setting by accident, then it said 

    Your connection is not private.

    So i took your advise and added 2 peices of code in the wp-config and it worked !!

    so now i can log into my backend now.

    i went to setting – general, and i cant change the URL and site setting , its right , but cant change it?

     

    The whole site works except the home page www.passionweaver.co.za

     

    Please can you assist?

     

    • Hello Seth,

      I believe that you currently have the settings locked in due to the settings in the wp-config.php. The tutorial also has you change things in the database. Using those instructions, you should be able to set the URL in the database. If you continue to have problems with making this change, then you can contact our live technical support for further assistance.

      If you have any further questions or comments, please let us know.

      Regards,
      Arnel C.

  • I had initially developed my website (before buying the domain “physiocomfort”) as a subdomain to my another website. I could reach it through https://physiocomfort.tirupatitentdecorators.com/physiocomfort/

    I have now bought the domain “physiocomfort” and want to access the site from www.physiocomfort.com/login/php

    I renamed home and siteurl as “www.physiocomfort.com” and I am seeing this error “You don’t have permission to access / on this server.”

    Please help. :-/

    Regards

    Anshul

    • Hello Anshul,

      When I checked the domain “physiocomfort.com”, it is not point to our hosting service. You need to either point the domain to our services or change the A record in DNS to point to our server. You will also need to add the domain name as add-on domain.

      If you have any further questions or comments, please let us know.

      Regards,
      Arnel C.

  • I had my site in a subdirectory and I moved it to the main domain! now when I click on my home button it tells me nothing found what I have noticed is that it sends me back to my subdirectory and I don’t know how to fix this problem but when I click on my logo it sends me straight to my index page and also I had some music on it and it is now not playing neither downloadable please can you help me ….. My website is adomabrown.com

    • You need to log into the dashboard and reset your permalinks. Moving a site does not update links and typically resetting permalinks fixes the issue.

  • Hi Arnel,

    We have set up a reverse proxy in order to have a hosted wordpress site that looks like it exists in a subfolder of our primary domain (www.kensyard.co.uk/the-hub/) but is actually hosted elsewhere at (kensyard-blog.co.uk). We have set up the proxy on our own servers and used the Reverse Proxy plugin from this article (https://pressable.com/blog/2015/10/15/reverse-proxy-plugin-for-using-a-hosted-wordpress-site-in-a-subdirectory/) on the WordPress side of things. However, we keep getting glitches with CSS, Fil-References etc. and I think it is because we need to change hte Site URL in WordPress settings as you explain.

     

    I have added the following lines to the WP-Config.PHP file: –

    define(‘WP_HOME’,’https://kensyard-blog.co.uk’);
    define(‘WP_SITEURL’,’https://www.kensyard.co.uk/the-hub/’);

    Which seems to solve the glitches – but also blocks me out of the WordPress Dashboard. I try to login at kensyard-blog.co.uk/wp-admin and it keeps trying to redirect me to https://www.kensyard.co.uk/the-hub/wp-login.php . So I tried switching the lines above to the other way round i.e.

    define(‘WP_HOME’,’https://www.kensyard.co.uk/the-hub/’);
    define(‘WP_SITEURL’,’https://kensyard-blog.co.uk’);

    But then, whilst I can now access the WP Dashboard, the CSS, File-reference glitches have come back. Any advice would be greatly appreciated.

     

    • It is normal that you would still need to log in at the location of your wp-admin folder, even if WordPress is using a new Site URL. This means your visitors will see the URL you specify, but for administrative purposes you may see the old URL.

  • Hello, 

    Im fallowing all the steps and getting into all links posted here. Im burning my brain :(. Dont know what do do longer. I make the changes in the wp-conf file, also from the dashboard, php my admin…nothing works. My site only go online with: icelandprivate.com/wp. Everytime i change it dont work the url without wp. SOme help please?

    • Hello Carlos,

      Sorry for the problems with your WP URL. Honestly, the changes to the URL are normally affected by only a few things: the .htaccess file, DNS settings, and the wp-config settings for your installation. Try disabling your .htaccess file (by renaming it), and then see if your wp-config changes take effect. If you want us to look at this issue further, then please provide your domain name. If you are not an InMotion customer, then provide a copy of the .htaccess file that affects your WP installation and also the settings in your wp-config file. We can investigate the issue in more depth then.

      If you have any further questions or comments, please let us know.

      Regards,
      Arnel C.

    • Hello
      i have problem , my website url blocked in facebook .. In this is procedure worked for me or not ??
      Is there any solution plz help me urgently…

  • Hi guys, I recently changed my domain from www.kitchenklass.com to www.kitchnlab.com and all good. Then I went to settings tab, the gereral and saw two lines still showing kitchenklass so I changed these to kitchnlab. Now its just words on the screen no theme. I also cant log on to the dashboard or anything else. Can it be fixed??  Thanks Jon

    • Hi Jon, it sounds like your new theme files may still be located at the old domain. What you described sounds like a missing CSS file. Of course, these elements should all be linked relatively, but if the above is the only change you have made I suggest reverting back to the old domain for the moment and/or make sure that the files at your new domain are linking properly with the database.

  • I think I followed all of the steps correctly. I’m trying to set up a development site as a subdomain of my current site (https://thinkingbeyondborders.org and the dev site is https://testsite.thinkingbeyondborders.org). I’ve got the dev site up, but I can’t seem to login. I use iThemes Security Pro to change the login screen URL. When I go to it on the testsite.thinkingbeyondborders.org, the login URL comes up. But, when I enter the login credentials, it opens the wp-admin of the original site. Thoughts?

    • Hello Robin,

      Sorry for the problem with the login. Make sure that your define statements are set correctly. If not, then they’re not applying. You may want to simply remove the define statements, and then edit your WordPress database directly. Change the URLs in the wp_OPTIONS table to meet the location of your WordPress installation files. The two entries correspond to the site and home URL. Also, if you’re using any type of caching, make sure to turn it off and clear it, get your URL working, then turn the caching back on.

      I hope this helps to answer your question, please let us know if you require any further assistance.

      Regards,
      Arnel C.

  • When I go to Settings/General on one of my sites, the one I want to change, there is no place for me to change the name. It just goes from site description to my email, then time zone. When I go to Settings/General on another site, I can see the 2 areas to change the url name. Why is that happening? why why why….

     

  • Hi, I got a question concerning the post.

    I have a wordpress website ‘example1.com’. Today I changed its WordPress address and Site Address to ‘example2.com’ in WordPress admin panel at ‘example1.com/wp-login.php’ under Setting/General. ?Please see the attached figure)

     

     

    However, ‘example2.com’ doesn’t even exist. So right now, I can no longer access my admin panel in WordPress through ‘example1.com/wp-login.php’.

     

    I never installed ‘wordpress’ in my local environment before. I always do the edit on the website. So when I saw your second option which is to change the ‘wp-config.php’ file. I’m very confused. Could you help me expain what should I input in ‘DB_NAME’, ‘DB_HOST’. And how can I run this php file to do the update. 

     

    Thanks very much

    • Hello Kevin,

      We do not see an attached file on your post. You might want to revert your changes back to when you had the previous domain, if you want to access it. The domain name must exist in order to work on the internet ( or you have at least made a hosts file change). The WP-CONFIG.PHP file is an internal PHP file that WordPress processes in order to obtain it’s configuration information. This includes the database and database user that is used to connect. Database host should be “localhost”. You can find your database and database name (or create a new one) in the cPanel MySQL database section.

      If you’re still confused with configuring your WordPress then please contact our live technical support team for further information.

      If you have any further questions or comments, please let us know.

      Regards,
      Arnel C.

  • Hi,

     

    I tried changing our website URL in general settings from www.walkforwater2015.org to www.walkforwater2016.org and I must have done something wrong. Now I can’t access either and I can’t find the website. Please help!

     

    Thanks!

  • Help! Our website was www.****2015.org and I tried editing it to www.****2016.org and just changed the URL in the settings. I must have changed it incorrectly because now none of the websites are working. How do I fix this??

  • Hi guys,

    having a problem that I think is linked to me ssl cert in some way.

    I have created a sub-domain and copied all files and the DB accordingly. I have updated the urls both in wp-config and directly in the DB. When I load the new sub site as https://test.example.com/ I get an ssl warning saying its an untrusted site. I click through those warnings (I do usually trust myself) and I get an error saying my browser does not support modern SSL extensions (happens in IE, Chrome and FF).

    Now if I change the urls to just be https://test.example.com/ (no ‘s’) then it just automatically redirects back tot he original site of https://www.example.com/

    Any help greatly appreciated. Thanks

    • Hello Mildy,

      Unfortunately there is not enough specific information in your question to troubleshoot. You will want to contact your support department for more account specific digging. If you are one of our customers, feel free to contact Live Support.

      Kindest Regards,
      Scott M

  • I can not see any url field! It’s only site tittle, tagline email, time zone, time format and language fields that are available!

  • Thanks Scott All fin nowe I had to wait a bit and refresh the pages. Working fine now. You are a life saver. Keep up the good work.

  • Hello

    I changed my wordpress and site address to https under general settings and it locked the wp-admin, then I did what you suggested to edit the fields site and home in the database from https: to http. I also added define(‘RELOCATE’,true); at the beginning of the wp.config file then I added define(‘WP_HOME’,’https://dstvinstallationssa.co.za’);
    define(‘WP_SITEURL’,’https://dstvinstallationssa.co.za’);

    Now I can access my wp-admin but if I open any of my pages as http it opens but when I navigate to another page its giving me 404 error and the http becomes https. From other browsers I cant even get through still giving ssl error. When I go to general settings wordpress and site address url is not editable but both contains http.

    Please assist

    Thx in advance

     

     

     

    • Hello,

      The URL settings will be grayed out if there are lines in the wp-config.php file. You can either make the change in the wp-config.php or remove the lines completely allowing you to make changes in the back end.

      I am not experiencing the behavior you describe when visiting your site, however.

      Kindest Regards,
      Scott M

  • I’m using clipford version of word press, when I go to general settings I can not find site url!!! How do I change it?

    Thank you!

    • Hello Paul,
      I am using the same version and can see it fine in my back office. Give it another look and tell us if you can see any URL fields.

      Kindest Regards,
      Scott M

  • Hello,

    I’m so glad I found this article, maybe you could give me some usable advise, as i’m battling with this issue for a couple of days now. So i did a wp site on the new.*********.hu subdomain, and i’m trying to move it to *********.hu. First i downloaded and deleted the existing site which was on *********.hu, then i copied the files from the “new” folder to the root. I just can’t figure out what to do with the database, since i used the same database for the new site and the existing one, just changed the table prefix value. If i don’t do anything with it, as you can see now, some special fonts are missing, and the links take me to the new.*********.hu, i can’t even access my dashboard, because if i type https://*********.hu/wp-login.php and try to enter, it redirects me to the dashboard for the new.*********.hu site.

    I also tried in myPHPAdmin export the database, find/replace the expression ‘new.*********.hu’ to ‘*********.hu’ delete the original database and then import the modified one. It just messed up my page even more.

    As my last hope, i contacted the host, but they said they could’t move my page, because the path of the pictures in the database are provided as an absolut path not relative. (If it makes any sense.) And now they wrote me to contact a web developer, because my problem is plenty hours of web developing work.

    Can you help me please?

    Thanks in advance,

    Vicky

     

  • Hi Matjaz… I see your site is back up 🙂  You should post and explain what method you used to change it back so it will help others.

    Joe

    • Hello matjaz,

      Unfortunately we cannot troubleshoot on a local machine. Just looking at the error, it says that the file is calling a function named add_action that has not yet been defined. This would not have anything to do with a domain name change, however.

      Kindest Regards,
      Scott M

  • Hi Matjaz,

    Go to the WordPress link https://wordpress.org/support/topic/wp_home-and-wp_siteurl and do as it suggests.  This will help you get your site back.

    Also, if you look up how to edit your database, you can change that setting back to its original setting which will also bring your site back.  But editing wp-config.php is probably the easiest way for a new person to do it. 

    Basically all you do is add the line:

    define(‘WP_SITEURL’,’https://your-site-name.com’); 

    anytime after the SALT lines in your wp-config.php file. 

    Good Luck,

    GoodOlJoe

     

     

  • hi!

    I followed the instructions, but still can not access the dashboard.
    There i changet my domain www.jacob.si to www.jacob.si/home and my site is gone. Can someone please help me. I changed all possible in FTP.

    it’s still “The server encountered an internal error or misconfiguration and was unable to complete your request.”

     

    (I’m new at this)

    I’m desperate

    • Hello Matjaz,

      Sorry for the problems with login. Your internal server error is a little too general unfortunately. You will need to work with the support personnel with your host in order to get more specifics with the error that you are seeing. They should be able to see an error that is more detailed that provides the information needed to troubleshoot your problem. Apologies that we can’t directly help with this issue.

      I hope that helps to answer your question! If you require further assistance, please let us know!

      Regards,
      Arnel C.

  • Hi,

    I have done the migration accordingly, home page is coming fine, but on clicking on any link, when its redirected to the subfolder, we are getting 404 Not Found error. Please help, thanks in advance.

    Thx, Shekhar

    • Hello Shekhar,

      Have you tried changing the permalinks to the default post id and then change it back to what you had it set to? This usually fixes the problem at hand.

      Best Regards,
      TJ Edens

  • hello,

    i have uploaded the data base successfully , and have configured the wp-config file, still i am getting ‘error established the database connection’. I contacted the host provider, they crosschecked and gave a conclusion that my wp_options table has some errors. i am unable to edit the wp_options table. please suggest me

    • Hello Arjun,

      The message “‘error established the database connection” means that WordPress cannot connect to the database. Since that is the case, the issue would not be in the wp_options table since that table cannot yet be seen.

      Ensure that your database user and password are correct in the wp_config file. This normally corrects that error message.

      Kindest Regards,S
      Scott M

  • Sometimes (if your wp is in a subdirectory of your domain root), it is also necessary to change the .htaccess file :

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /new-subdirectory/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /new-subdirectory/index.php [L]
    </IfModule>

    # END WordPress

  • Hi, folks,  please help me i am trying to move my website to new domain.. after doing all process or moving content and databases.  i am not able to login with new domain this redirect me to old one..    when i am trying to login here couponinformer.com/wp-admin it redirects me to my old site www.freecoupondeals.in. what i do i am so confused.

  • I accessed Settings > General and changed the WordPress URL and Site URL to what I wanted the new URL to be. From https://27.121.64.62/~pipi7974 to https://www.pilpelbythesea.com.au.
     
    Now I am unable to access the website, WP dashboard/admin/login, and receiving 404 Error’s left right and centre. I have done everything recommended to fix the problem and nothing has worked – it should have been such a simple fix, but all the solutions seem to work for everyone but me. What could have I done differently?
     
    For example,
    – I changed the Site and Home URL back to the original in CPanel (phpMyAdmin)
    – added: define(‘RELOCATE’, true);
    – added define(‘WP_HOME’,’https://27.121.64.62/~pipi7974′);               define(WP_SITEURL’,’https://27.121.64.62/~pipi7974′);
    – I tried disabling the plugins and accessing the website.
     
    NOTHING HAS WORKED, what else is there for me to do? Please help!
    • Hello Joseph,

      Please look into this WordPress Codex with more options to try and fix the issue at hand. As defining the WP_HOME and WP_SITEURL should have resolved the issue.

      Best Regards,
      TJ Edens

  • When I go to my settings –> general, there is nothing that says “WordPress address” or anything close. Is this something that is only available in Premium? I have paid for a domain but accidentally chose the wrong site url than what I wanted and I would like to change the url to what I wanted originally.

    • Hello TF,

      Thank you for contacting us. This is standard in every installation of WordPress. When you login to the WordPress dashboard, and click Settings you should see both:
      WordPress Address (URL)
      &
      Site Address (URL)

      You should then be able to replace the existing URLS, such as: https://example.net

      If that is not working for you, then use one of the other 3 options explained above.

      Thank you,
      John-Paul

  • Thanks dear , your post such a very good . After  reading this post my problam resolved and the major benifit of this post is that there is no dependancy on datbase to change siteurl.

  • Thank you John-Paul.  I will have to check to see whether I have enabled debugging. I have not yet gone through the troubleshooting techniques but will look there.  The test URL is testsite.endgame-success.com and the live site is endgame-success.com.  Thank You

    • Hello Alan,

      Thank you for contacting us. Since it is not hosted on our servers, I do not have access to check anything. But debugging mode should definitely help in the troubleshooting process, since I too am seeing a blank screen.

      A blank screen often is suppressing the errors.

      Thank you,
      John-Paul

  • I am trying to create a test site for my WP site. I have followed what I thought to be all the steps in creating a new DB, copying files, chnaging URL in phpMY Admin …all the steps and have done this now 4 times. I have also watched and rewatched Jeff’s video (wich is very good by the way). Each time after completing all the steps, I try to bring up my test site and I get directed to a WP page that first asks to select a language and then asks me to enter the site name, url etc. Bottom line, is I am not getting a test site that is a clone of my live site…I get a blank page.  I must be doing something worng but heavens knows what…

    I am a novice (newbie) at this BTW. Thx

    • Hello Alan,

      Thank you for contacting us. We are happy to help, but will need some additional information. When you are being redirected to the WP page, what is the URL? The original site or test site?

      Have you enabled WordPress debugging? With debugging turned on, it is much easier to locate any errors within your WordPress site as well as any plugins and themes that may be causing errors.

      Have you gone through the common WordPress Treoubleshooting techniques guide? This will often help determine if there is a plugin/theme issue going on.

      Thank you,
      John-Paul

  • Hi there,

    Firstly, I have to inform you that I’m a complete newbie. I’ve only done one WP site before, and encountered the same problem then too. When I tried getting the /wp off my site’s url, my entire site went into full spaz and I had to get one of my super coder buddies to figure out what I did. It even took him a while. After that horrific experience, I’m VERY hesitant to fiddle around.

    My problem is with the basics of just moving the wp files to a new directory. Where do I create this new directory? (I’m using cPanel, btw)

    I’ve tried your steps on using PHPMyAdmin, above. And it makes total sense in my head, but when I do it, the site just gives errors. I have also obviously tried changing the url in the wp dashboard. And, I’m DEFINITELY NOT going to go into the site’s code. 

    Your tutorials are laid out pretty clearly, I’m just not getting it right.

    Help, please? 

     

    • Hello Orlitza,

      The easiest way to do this is actually in the wp-config.php file of your wordpress website. you would place the following code in that file:

      define(‘WP_HOME’,’https://newdomain.com/’);
      define(‘WP_SITEURL’,’https://newdomain.com’);

      Best Regards,
      TJ Edens

  • Hello,

    I have changed the URL https://xyz.com > https://www.xyz.com from the admin panel, since then the domain doesn’t work (frontend+backend).

    I have changed the field siteurl and home in my database: https://www.xyz.com,

    add the define line (WP_HOME+WP_SITEURL) in wp_config.php

    Nothing change.

    Help me!

    • Hello Sergio,

      If you are a customer with InMotion Hosting, the “WWW” link is actually a cname (or alias) for the domain, so regardless what people enter in the browser, it will resolve to your domain name. If you want to force the WWW in WordPress you will need to make a change in the .htaccess file. Check out this post in the WordPress support forums for the steps in how to do this.

      If you have any further questions or comments, please let us know.

      Regards,
      Arnel C.

  • Hi,

     

    I want to change my site url form https://richandclassy.com/wordpress_9 to https://richandclassy.com

    However when i do so it comes up with 403 forbidden and i can’t access my site.

    Anyone know how this can be fixed? Ive tried changing it in general setings and inwp-config.php but to no success.

    Any help on the matter would be appreciated.

    • Hello Zac,

      Thank you for contacting us. A “403 Forbidden” error is typically caused by incorrect File permissions, or an existing rule in your .htaccess file is interfering with your code.

      This is explained further in our guide on 403 Forbidden Error.

      If you have any further questions, feel free to post them below.

      Thank you,
      John-Paul

  • Hi Arnel,

    Thanks for your reply. I’ve now changed the slug for the home page to https://www.example.co.uk/fresh-raw-juice-detox-diet-plans ;but we haven’t ranked in the SERPS yet so I don’t know if this will make any difference? Although, it sounds as though I should just do a 301?

     

    Kind regards,

    Marcelle

    • Hello Marcelle,

      Thank you for your question. For affecting your SERP position, I recommend using Google Webmaster Tools.

      The official Google Webmasters Support site states: “If you need to change the URL of a page as it is shown in search engine results, we recommend that you use a server-side 301 redirect. This is the best way to ensure that users and search engines are directed to the correct page. The 301 status code means that a page has permanently moved to a new location.

      Thank you,
      John-Paul

  • Hi. I’m hoping this is a simple request….I want to change my homepage from www.example.co.uk to www.example.co.uk/detox-juice-diet, for SEO purposes, without changing any file locations. Is it as simple as changing the site address in General Settings please? I’m sure I did this before with another website years ago and it caused major issues! Any help would be appreciated thank you 🙂

  • Actually, your answer to this  belongs to ‘sandeep’. 

    It was not my question, I was just helping you to decipher it. 😉

    and You’re welcome!

  • I think what he is trying to say (ask) is this:

    There are four of us who are friends running our site. We would like the site to send a notification to all four of our email addresses whenever an activity e.g., comments, posts, uploads or a new user registers on the site. 

    I hope this helps.

    • Hello GoodOlJoe,

      If you’re using WordPress there are several plugins that you can obtain such as Stream that will notify you when an activity has occurred on your site. Check out and see if that doesn’t meet your needs for notification.

      Regards,
      Arnel C.

    • Hello Sandeep Kumar,

      If you’re using WordPress there are several plugins that you can obtain such as Stream that will notify you when an activity has occurred on your site. Check out and see if that doesn’t meet your needs for notification.

      Regards,
      Arnel C.

  • Hello sir,

     

    Actuly i am asking of you if any buddy will register on my site that time notification should come on me and friends mail id.

    • Unfortunately, your question is very hard to understand. Could you clarify exactly what you are trying to accomplish?

  • Hello Sir,

     

     Actualy i am asking of you. we are four friend we want if any buddy will register on my site that time notification should come on me and friend mail id. if any buddy will comment ya any type of document will upload on my site if any buddy will ask any question notification should come me and my friend mail id. this i want how can i do that have you any type of please give me answer

  • i have four mail id i want to link with my site. when any person will register on my site

    than notification should come on my four mail id 

    • Hello Sandeep,

      This article covers how to change your URL settings in WordPress. I also am not quite understanding what you are asking. Please be more specific and give as many details as possible, but ask a new question so that it keeps the Support Center topics organized.

      Kindest Regards,
      Scott M

  • Hi,

    I have recently removed a plugin that caused the site not load properly, following that I am unable to login to admin, but am redirected to https://www.example.com/wp-admin in stead of https://www.thelaptopdirectory.com/

    Would appreciate any assistance.

    Thanks

     

    • Was your site ever on that previous domain? What was the plugin that you removed? Do you have any additional information inside your .htaccess file?

  • Thanks for the info.

     

    I am moving my website to a new domain,  same server.  I have purchased my new domain that I want to change my old domain to,  after following the steps do I need to edit the NS for new domain? 

     

    Thanks

    • Hello Robert,

      If the new domain is not yet pointed to our server, then you will want to change the information so that it points to our name servers.

      Kindest Regards,
      Scott M

  • Changed it the way you said, now when I click on the post links like e.g. https://envymestudio.ro/studiouri-videochat-bucuresti/ (<– this is a post) it bounce back to envymestudio.ro

    PS: after i changed that in general settings, in .htaccess of the wp it was already modified.

     

    • Hello Alex,

      Check one more thing to be sure. Ensure that your PermaLinks are set to Post Name. Give that a try. Those are all the changes our WordPress expert needed to make on a fresh install in order for it to function. If it still does not work, there may be other things interfering within the htaccess. Do you have other lines in the htaccess beyond the basic WordPress setup (about 6 or so lines)?

      Kindest Regards,
      Scott M

    • That’s it Scott,

      # BEGIN WordPress

      RewriteEngine On
      RewriteBase /videochat-bucuresti/
      RewriteRule ^index\.php$ – [L]
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule . /videochat-bucuresti/index.php [L]

      # END WordPress

    • Hello Alex,

      Are there any other WordPress sites on the account? That could cause issues as the htaccess files may conflict. From what I have seen, this is not the case, however. I asked our WP Expert and other than the instructions we gave you, he does not know of another way to do what you are asking. There also seem to be no plugins that offer that functionality. As it did work with our test server, it seems it can be done, but there appears to be something on your account that is interfering with the process. Did your hosting support have any suggestions?

      Kindest Regards,
      Scott M

    • I have another htaccess on root directory, which belongs to the html site, i will post the content of it:

      RewriteCond %{HTTP_HOST} !^envymestudio\.ro$ [NC]
      RewriteRule ^(.*)$ https://envymestudio.ro/$1 [R=301,L]
      ErrorDocument 404 /error
      RewriteRule ^error$ / [R]

      ## EXPIRES CACHING ##

      ExpiresActive On
      ExpiresByType image/jpg “access 1 year”
      ExpiresByType image/jpeg “access 1 year”
      ExpiresByType image/gif “access 1 year”
      ExpiresByType image/png “access 1 year”
      ExpiresByType text/css “access 1 month”
      ExpiresByType text/html “access 1 month”
      ExpiresByType application/pdf “access 1 month”
      ExpiresByType text/x-javascript “access 1 month”
      ExpiresByType application/x-shockwave-flash “access 1 month”
      ExpiresByType image/x-icon “access 1 year”
      ExpiresDefault “access 1 month”

      ## EXPIRES CACHING ##


      mod_gzip_on Yes
      mod_gzip_dechunk Yes
      mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
      mod_gzip_item_include handler ^cgi-script$
      mod_gzip_item_include mime ^text/.*
      mod_gzip_item_include mime ^application/x-javascript.*
      mod_gzip_item_exclude mime ^image/.*
      mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*

      AddOutputFilterByType DEFLATE text/plain
      AddOutputFilterByType DEFLATE text/html
      AddOutputFilterByType DEFLATE text/xml
      AddOutputFilterByType DEFLATE text/css
      AddOutputFilterByType DEFLATE application/xml
      AddOutputFilterByType DEFLATE application/xhtml+xml
      AddOutputFilterByType DEFLATE application/rss+xml
      AddOutputFilterByType DEFLATE application/javascript
      AddOutputFilterByType DEFLATE application/x-javascript

      i removed this –> RewriteRule ^(.*)$ https://envymestudio.ro/$1 [R=301,L] –> and now when I click to a post, it takes the new path but it can not find the post.

    • Hello Alex,

      What happens if you rename the .htaccess file in your main site? Does the WordPress work then?

      Kindest Regards,
      Scott M

    • i changed the name of .htaccess from the main site. Now it does not redirect anymore. The permalinks are shown correctly e.g. envymestudio.ro/post1 but it returns 404 on the post.

    • Hello Alex,

      You may want to return the settings to their original state now. We are at a loss as to why it works for us but not on your server. You may want to check your hosting support to see if they have any ideas about their specific environment. They may know something we don’t about their side. Without being able to play with the code on your server, we are unable to assist any further. Apologies our tips did not work out on the site.

      The only other thing I can think of is to see if disabling plugins may have some effect. Once you can get it to work, you would be able to re-enable them one at a time to see if there is one that is interfering somehow. I do not think this is probable, but it is worth checking out as a last resort.

      Kindest Regards,
      Scott M

    • PROBLEM SOLVED

      https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install

      Thank you guys for support 🙂 You gave me some ideas about what was not working.

      Have a good day Scotty 🙂

    • Hello Alex,

      What a find! It looks like we will be adding more information to our WordPress knowledge base. Thank you for your patience and we are so very glad a solution was found.

      Kindest Regards,
      Scott M

  • 1) Set your WordPress URL in the General Settings to simply the domain name. (Note: Leave the WordPress URL as it is). 

     

    Change it or leave it as it is?  

    • Hello Alex,

      Scott said, “My apologies!” He meant to say change the bottom one (site address), and leave the top one (WordPress Address) alone. Our apologies again for the confusion!

      Kindest regards,
      Arnel C.

  • Thank you Scott, 

    I reversed the process, and now it is back as it was before. Let me explain the problem in details:

    1. My website is (envymestudio.ro) which is an html site.

    2. The WP Blog is at the adress: envymestudio.ro/videochat_bucuresti/

    the posts are like this: envymestudio.ro/videochat_bucuresti/post1

    What I want to do is to keep the current location of wp installation which is envymestudio.ro/videochat_bucuresti/ but to show the posts like envymestudio.ro/post1

    This is the problem. How can I do that? 

    Thank you very much.

    • Hello Alex,

      I understand now. I checked with our WordPress expert and he gave me one solution. The solution will below does have a caveat. You will lose the main wordpress page. So, if you do not need that page, then this should work for you.

      1) Set your WordPress URL in the General Settings to simply the domain name (envymestudio.ro). (Note: Leave the WordPress URL as it is).

      2) Next, go into your .htaccess file in the root of your WordPress and change the following line:

      RewriteRule . /index.php [L]

      To the following:

      RewriteRule . videochat_bucuresti/index.php [L]

      Then you should be able to access the posts in the format you mentioned: envymestudio.ro/post1

      This worked with our test server. Please let us know if you have any further questions.

      Kindest Regards,
      Scott M

  • After I did all the procedures above, the posts are not displaying anymore. It returns back to root. 

    my website is www.envymestudio.ro 

    maybe somebody can help me. 

    Thanks a lot

    • Hello Hello,

      I checked the site you referenced and all links seem to be working fine. They are not returning to the main page as you described. Were you able to correct the situation? You only need to use one of the methods above, not all of them, though I do not think using more than one will have any adverse effect.

      Kindest Regards,
      Scott M

  • We had a volunteer come in to our nonprofit and redo our wordpress site. He created a root directory and put everything into https://example.org/2013 

    If I want to change “2013” to something timeless or just want to get rid of it, what should I do? 

    I wouldn’t even know how to get to the site’s files — don’t know where they are. I have only used the wordpress login (web access) to do anything.  Sorry if this is ridiculously beginner level, but I am afraid of messing up our site, even after reading all about this.

    • Hello Joe,

      Unless a typo is made when entering the information, there should be no Server Error afterwards. In the event something like that does happen, simply follow the instructions above for modifying the wp-config.php file to revert back or input the correct info. Then you can log into the admin dashboard and fix it.

      Kindest Regards,
      Scott M

    • Hello Kayani,

      Unless you have your www subdomain pointed elsewhere, it should not have had that effect. Since you put it back, try clearing your browser cache to see if that helps. If that fails, you may want to contact your hosting provider’s support so they can assist with your particular account.

      Kindest Regards,
      Scott M

    • Hello Vap,

      You can change the subfolder to anything you like, but you would first need to log into the server and either a) create that folder and copy all the files over to it or b) rename the current 2013 folder to the new name.

      You would need access to the actual server to do so, however.

      Kindest Regards,
      Scott M

  • I have straight away edited and added www.in wp admin and lost my site can not reach admin or site now.When this happened immediately on saving i pressed back and removed www and again saved it but site is still not showing.Can you please suggest action.

  • Excellent stuff, really very helpful. I was soo much disappointed when I lost access to my site. Worked hard referred to many blogs but din’t help. Your videos were really helpful in sorting this out. Thank you very much!!

    • perfect!!!!!Thanks!!!!!!!!!!!!!
      https://www.inmotionhosting.com/support/website/wordpress/wordpress-changing-the-site-url-and-home-settings

  • Hi,

    I want to change the address(WP_HOME) we type in the url to reach my website.Now it is www.example.com/abc, I want the  people to type www.abc.com in their browser to reach my WordPress website. How can I do that? Thanks in advance.

    • Hello nb,

      You will initially want to change the URL in the wp-config.php file so you can then access the wp-admin, so follow the instructions above named ‘Change WordPress address with wp-config.php file’.

      Once that is done and you can access the site at ‘www.abc.com’ you can then make the change in the admin dashboard. Follow the section titled “WordPress WP_HOME and WP_SITEURL settings” those instructions. Once that is completed, you can return and remove the lines you added in the wp-config.php file.

      Kindest Regards,
      Scott M

  • I’m so glad I found this (Bing!) – I thought my site was going to be messed up forever. I must had wasted a couple hours looking for a configuration file that had the right words.

    By the time I completed the upload of the file as per:

    “Change WordPress address with wp-config.php file”

     

    Then I was done!!

    Yahoo!! I actually thought it would be impossible to find this advice. Thanks for proving me wrong.

  • This article says:

    WordPress Address / WP_HOME             The address where your WordPress core files reside.

    Site Address / WP_SITEURL   The address typed in a browser to reach your WordPress blog.

     

    In WordPress site, the opposite is said to be true:

     home is the address you want people to type in their browser to reach your WordPress blog.

    WP_SITEURL, defined is the address where your WordPress core files reside.

    https://codex.wordpress.org/Editing_wp-config.php

    • Hello Visakh,

      Thank you for pointing out the error. We have made the change in the article to remain true to the WordPress official documentation.

      Kindest Regards,
      Scott M

  • Hi,

    I need to change WP_SITEURL of my worpress site but is it possible to mantain the original site_url for admin access?

    es:
    my domain is www.mydomain.it
    I’d like to change my site url in: www.mynewdomain.it/projects/

    and if I change WP_SITEURL all is ok but I can’t to login in admin page: my installation is a multisite

    thanks

  • Thank you! I think it was the template I was using. It was changing breroz.com to brerozs.com.

    Thank you for answering me. 🙂

  • My wordpress keeps adding an “s” to the end of my Site Address (URL). Which causes it to redirect. Why would WP do this?

    • Hello Bre,

      WordPress should not be doing that. Be sure to check your dashboard, then also the wp-config file. If all else fails, check your .htaccess in the root WordPress folder to see if there is a misconfigured setting. It is a bit cryptic, but the code for the rewrite rule would have an extra ‘s’ in it if it is the cuplrit. Removing that would help, if it is there,

      Kindest Regards,
      Scott M

  • Hi

    I had problems with login to my dashboard after I made a copy of my site.

    I tried the fix.

    define('RELOCATE',true);
    
    and it worked. But my question is...
    do I leave it in the file or should I remove it?

    Sincerely

    Ted
    • Hello Ted,

      You can leave it there, though I would recommend that you remove it after looking to see where the location of your Administrator has been set. The information should be in your Administrator already (as indicated in the article above). If you want to be sure that it is set permanently, use the database option described above to set the location permanently – though WordPress is set to work with the location change in the Administrator settings.

      Regards,
      Arnel C.

  • Thanks to those that put this thread together! I am smiling again… Very nearly had myself a ‘hissy’ fit!

    It was the myPhPadmin solution that did it for me.

  • Can you please explain the difference between the original premise of the article –putting WordPress in a subfolder– and your second option response to Rausty on 04/17?  I don’t see the difference, yet the answers are different. 

    • The difference in these is moving all of the files versus moving just a few of the files and editing the configuration within WordPress. The choice between these is simply based on preference.

  • Hello,

    In 5 years of using wordpress Ive never ran into this problem. When I uploaded my WordPress site it came out adding a /wp to the address of my site and all pages can only be accessed by adding that to the end of my url. How can I get it to render properly to the true url’s without the /wp?

    Thanks

    • Hello Benjamin,

      What happened was that WordPress was installed into the subfolder named WP. You can use the instructions in the tutorial above to use the WordPress Admin to make it so that you don’t have to type the “wp” in your URL. You can also move your WordPress installation into the root folder. This is a much more involved process though.

      I hope that helps to explain the issue. In either solution, you would not need to include WP in the URL when accessing the site.

      Regards,
      Arnel C.

  • How can i modify the site url on the website hosting by my home server? when i change it to ‘localhost’,the outside world can’t access my website.when i change it to ‘https://mydomain.com’, i cant get into my website on my server computer. i’m using DDNS services. plz help.

    • Hello jumbohalo,

      Thank you for your question. Depending on your specific setup, you may have to setup Port Forwarding, to resolve to your server.

      You may want to also check with your ISP, to ensure they allow incoming connections to port 80 (the standard internet port).

      Here is a link to a helpful post on accessing WordPress from localhost AND domain in the official WordPress forums, that is similar to your question.

      If you have any further questions, feel free to post them below.
      Thank you,

      -John-Paul

  • Hi Scott, Many thanks for the quick response. I just updated the wp-ecommerce plugin and I lost everything including WP_Dashboard.

    This is the error message I am getting: Fatal error: Cannot redeclare wpsc_print_product_list() (previously declared in /home/the24064/public_html/wp-content/plugins/wp-e-commerce/wpsc-core/wpsc-deprecated.php:465) in /home/the24064/public_html/wp-content/themes/nathan/functions.php on line 504

    • Hello Dharamveer,

      You may want to rename the wp-ecommerce plugin from the plugins folder to see if the site functions correctly without it (dashboard, regular posts, etc). If so, then the error is definitely within the wp-ecommerce plugin.

      It is possible the theme and the current version of the plugin are fighting. So if it works with the theme turned off, change your theme to another for testing, say one of the defaults, then re-enable the plugin. If that works, then it is the combination of the plugin and theme. Also check to ensure the theme is only installed once in the plugin folder.

      Kindest Regards,
      Scott M

  • Hi I messed up my site by editing wordpress and site url. followed the above method and I am able to login to WP Dashboard and can see the home page. But none of the other pages are working. Error 404 is being displyed.  my site https://www.thewholehog.com.au/

    Please help asap.

    • Hello Dharamveer,

      Thank you for your question. I can see your site now, so it appears you have corrected the URL issue. However, there is an error on your pages reading “Call to undefined function wpsc_is_viewable_taxonomy() in /home/<removed for privacy>/wp-content/themes/nathan/loop.php on line 127 ” In researching, there is not much available in the cause and fix of the issue. I did find one instance of the error that was fixed by installing the wp-ecommerce plugin. It seems the function it is calling is tied to that plugin.
      Please let us know if that helps.
      Kindest Regards,
      Scott M

  • I built a test website using an extension :

    www.website.com/test

    now I want to move the extension “test” to Website.com

    I want the contain of website.com to be what I build under “test”

    • Hello Rausty, and thanks for the comment.

      You would have two options in order to move WordPress from a subfolder such as example.com/test to just example.com.

      You can either move all of your files from the /test directory up one level to your main site’s document root. This is the recommended method to ensure that everything with WordPress continues to function properly.

      Or you can also just tell WordPress to utilize the files in the /test directory and just copy over 2 WordPress files if you’d like to keep your document root clear of all the WordPress files. This can complicate matters a bit, but you just have to keep in mind when trying to access things like /wp-admin to login to WordPress, you’d still need to use example.com/test/wp-admin.

      The first option of simply moving your entire WordPress site from a subfolder to your document root could be completed with these steps:

      1. Login to WordPress
      2. Hover over Settings then click on General
      3. Both your WordPress Address (URL) as well as your Site Address (URL) settings should both say https://example.com/wordpress

        You’ll want to change both to just read https://example.com

        Now you’ll want to click on Save Changes, but note that as soon as you do WordPress will throw a Error 404 – Not Found error.

      4. Now you’d want to move all of the files and folders from your /test directory to your main document root.

      The second option of making your WordPress site accessible from just the document root of your website, while still retaining the bulk of the WordPress files in a /test folder. Could be setup following these steps:

      1. Login to WordPress
      2. Hover over Settings then click on General
      3. Both your WordPress Address (URL) as well as your Site Address (URL) settings should both say https://example.com/wordpress

        Change just the Site Address (URL) to https://example.com

      4. Copy DO NOT MOVE the /test/.htaccess and /test/index.php files to your main document root.
      5. Edit the index.php file now sitting in your document root and change this line:
        require( dirname( __FILE__ ) . '/wp-blog-header.php' );

        To this:

        require( dirname( __FILE__ ) . '/test/wp-blog-header.php' );

        Then save the file and you should be able to access WordPress from your main example.com now.

      Please let us know if you had any further questions at all.

      – Jacob

      • Hi, I’ve tried the second option, copied and edit files. I can show the site but root page linkts to https://example.com/wordpress not tohttps://example.com. I have deleted the /wordpress in WordPress Address (URL) and I obtain a 404 error in root page. I can browse everything (without /wordpress) except the root page.

      • Hi, I recommend checking the document root for the domain name, particularly if it is not the primary domain on your account. Alternatively, the database might be storing the old URL, so I recommend checking that as well.

  • I follow the step above, the issue has been fixed, All I had to do was just to wait for sometime, the wordpress login page was overided with the site login page. All is working fine. Thanks for the help

  • I have having problem connecting to my admin loginon wordpress, I tried the step above, but I was redirected to my home page instead of my login page

    • Take a look at the address bar. Did it redirect to another domain from before you changed the site URL?

Was this article helpful? Let us know!