WordPress Relocation Without Editing the Database

Here’s a tip I picked up on the WordPress hackers’ list: you can change the “siteurl” WordPress option simply by adding define('RELOCATE',true); to the wp-config.php file and browsing to wp-login.php.

The “siteurl” option—or what’s called “WordPress address” under the admin options menu—is a database value that refers to where the actual WordPress files live, as opposed to where the site appears to be, which is the “home” option (called “Blog address” in the options panel).

For example, if I have my site located at www.ilfilosofo.com, it would be easier to keep track of WordPress files, manage upgrades, etc., if I were to put all the files in a sub-directory, say www.ilfilosofo.com/wp. Everything would still appear at www.ilfilosofo.com (the “home” setting), but the files would actually be at www.ilfilosofo.com/wp (the “siteurl” setting). Normally you’d have to edit the database to do this, and it’s something I do a lot.

(Note that contra the hackers list, this resets only the “siteurl” option, not the “home” option.)

Since I’m frequently editing the database just to change the “siteurl” and “home” options, what I’d really like is to be able to set them in wp-config.php. Lead WP developer Matt Mullenweg has suggested something similar, so I submitted a patch with the hopes of getting this feature into a future version of WordPress.

122 Comments

  1. hi filosofo! great tip. can you help me in this case: i have a blog (with all contents, images, pages, posts) in domaindotcom/blog
    i want to change the url for this project to
    domaindotcom/site
    what is the correct and easiest way to do that? what more i need to do? i must uploads all the files to the new ‘site’ dir? sorry for my english.
    thanks a lot!

  2. hi filosofo. can you return me about this case above… thanks!


  3. what is the correct and easiest way to do that?

    It depends on whether in your posts you link to stuff in /blog/. If not, you can just add the WP_SITEURL and WP_HOME constants in your wp-config.php file.

    Otherwise, you might need to do a search and replace in the database itself or in the sql dump of your database.

  4. hi
    how are you!!
    my question is the following
    i intaklled a theme on my website on a temporaily website of mine in WORDPRESS untill i registered the name and domain, now i added pictures and all the information etc onto that temp website..
    i have now bought the domain and what i did is on the cpanel i copied and pasted all the files and themes onto the new domain ok?? but now what i want to do is manage to change the following
    1: when i type in the site all is ok, but when i eg go to see pages the temp website details appears at the top on the http:// THE TEMP WEBSITE DETAILS APPEARS… and it looks so unprofessional as the customers thinks they in the wrong website.. please advise me on what can be done as i do not wnat to re introduce all the pictures and information again onto the new domain
    can u help
    awaiting your advise
    thz jack
    pS the site is http://www.edinburghtours.com is on underconstruction so you will not be able too see the page changes at the top when one changes too see a dif page http://

  5. Hi, I can’t get into my dashboard or even my cpanel(from the web host). the site’s live but trying the wp-login.php route brings me a blank page. Please what can Ido??? Help

  6. I have got the same problem as that of Manuel, I can’t login to my WordPress dashboard as well and now I am freaking out, really.

  7. It took me some time to understand your tutorial but I think, I have now successfully moved my blog without touching a single code in my database files, thanks for this tut, greatly appreciate it.

  8. Thanks alot for the information !

  9. Well can you explain it a bit more ?

  10. That was really painful, when updates feeds won’t work

  11. went over this internet site and I think you have a lot of excellent info, saved to fav (:.

  12. Just looking for the next one of the blog you like this one. It is very useful information. Thanks for sharing.

  13. Wonderful blog! I certainly adore how it is straightforward on my eye balls as well as the particulars are properly written. I bookmarked your site!

  14. What do we think of an real truth TV show being broadcasted for applications to be made onto the platform? We’re not too sure. navette aeroport nice cannes

  15. I’ve obtained exactly the same problem as in which of Manuel, When i can’t membership to our WordPress dashboard likewise and from now on I will be freaking out, actually.

  16. When i can’t membership to our WordPress dashboard likewise and from now on I will be freaking out, actually. George Paul

  17. Thanks for taking the time out to share this with the readers. I really appreciate the info you showed there best essay writing service. Keep doing what you’re doing

  18. Wonderful blog site! My spouse and i certainly adore the way Fat loss supplements it can be straightforward on my eyesight tennis balls along with the points tend to be correctly created. My spouse and i bookmarked your site!

  19. Your article has helped me to understand this subject on a different level. I would like to appreciate your efforts for exploring this issue. Thank you for your information.Wholesale Garcinia cambogia

  20. Urine Stone is precise to within a amount point. download aimbots

  21. I’ve acquired exactly the same issue as in which of Brother, When i cannot account to our WordPress dash panel furthermore and from now on I will be throwing out, actually. fenetre alsace a colmar

  22. The highly medical PISRQ (often generally known as “Piss Rock” for short) can evaluate the fall of the oral cavity sides as a individual changes away from a buddy or associate. phone detective

  23. Chicago Ideas Week on Friday as part of its Lunch n’ Learn series to connect with and promote stellar social entrepreneurs. For more information on Educators 4 Excellence, visit energimærkning pris

  24. I have now purchased the sector and what i did is on the cpanel i duplicated and duplicated and pasted all the information and styles onto the new sector ok but now what i want to do is handle to modify the following.
    Web Design Hamilton

  25. Everyone realized Jimmy was in for it now. “So, what kind of life-affirming declaration have you got there now, Jimmy?” She sniped. “Don’t response that. download keygen games

  26. I have right now acquired your sector along with precisely what i did will be on the c panel when i Gary Cortez cloned along with cloned along with pasted all the details along with styles on to the modern sector ok yet right now precisely what i want to carry out will be manage to modify the next.

  27. Under the administration choices menu—is a data source value that represents where the real WordPress information live, in contrast to where the site seems. Asbestos artex

  28. Under the administration choices menu—is a data source value that represents where the real WordPress information live, in contrast to where the site seems. Asbestos removal Glasgow

  29. And figure out whether that individual is full of sunlight and comfort or anger and a desire to jampacked things until the cops appear. expensive handbags

  30. Thanks for your info liked been recently looking at with regard to a short time top quality essay writing services review, and just planned to let you know My spouse and i carry on and take pleasure in your creating

  31. In lifestyle, there’s generally one and only one factor you can do in this (and most) situations: Discuss to the individual. hotels.com alennuskoodi

  32. The “siteurl” option—or what exactly is known as “WordPress address” under the administration choices menu—is a data source value that represents where the real WordPress information stay, in contrast to where the site seems to be, which is the “home” choice (called “Blog address” in the choices panel). canape design en cuir

  33. Since I’m regularly modifying the data source just to modify the “siteurl” and “home” choices, what I’d really like is to be able to set them in wp-config. buy youtube views

  34. I have got the same issue as that of Brother, I cannot sign in to my WordPress dash panel as well and now I am throwing out, really. closet door ideas

  35. The “siteurl” option—or what exactly is known as “WordPress address” under the administration choices menu—is a data source value that represents where the real WordPress files. make a claim

  36. It looks so not professional as the clients believes they in the incorrect web page.. please recommend me on what can be done as i do not wnat to re present all the images and details again onto the new domain. http://www.isabeloffer.com

  37. At my blog – The Driving Authority I have used wordpress to create a driving school website

  38. I was able to capture a glance of some of the new produces, under the business’s new “Blue Line” at the latest AWFS tradeshow in Las Las vegas. http://www.coinvex.com/

  39. The 50cc shots of thorazine while secured down to a desk. Even in our pitch-dark periods, there will be someone to mild the way. http://sgp-propertyguru.com/condominiums/alex-residences

  40. Observe that contra the online hackers record, this starts over only the “siteurl” choice, not the “home” option. pest control london

  41. I have got the same problem as that of Sibling, I cannot indication in to my WordPress sprint as well and now I am tossing out, really. League of Legends Hacks

  42. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info. http://www.drpaydayloans.co.uk/

  43. Chicago, illinois Concepts Week on Saturday as part of its Lunchtime n’ Learn sequence to link with and enhance outstanding social business owners. For more information on Teachers 4 Quality, check out . orlando roof repair

  44. I found your website perfect for my needs. Thanks for sharing the great ideas. Whole article is too good and well written.Garcia Cambodia extract reviews | pure Garcia Cambodia extract reviews | pure Garcia Cambodia reviews υγραεριοκινηση

  45. I’ve acquired right the identical emanation as in which of Buddy, During i cannot explanation to our WordPress dart committee yet also from directly on I determination be throwing away, indeed. Hedera schutting

  46. The problem with making your website rely on unique technology, such as a particular version of Show, is that you eliminate all those who do not have access that unique technology. http://pinebeds.org/cheap-bunk-beds/

  47. It looks so not professional as the clients believes they in the incorrect web page. Indian penic

  48. Can evaluate the fall of the oral cavity sides as a individual changes away from a buddy or associate, and figure out whether that individual is full of sunlight and comfort or anger and a desire to jampacked things until the cops appear. http://officialdogtraining.com/

  49. Designs on to the contemporary industry ok yet right now accurately what i want to bring out will be handle to alter the next. do my math homework

  50. It took me some time to comprehend your guide but I think, I have now efficiently shifted my weblog without in contact with only one rule in my data source information, thanks for this tut, significantly appreciate it. pirater un compte facebook

  51. It looks so not expert as the customers considers they in the wrong website.. please suggest me on what can be done as i do not wnat to re existing all the pictures and information again onto the new sector. Reverse phone Detective

  52. Very good publish. I just came upon your website and desired to say that I have really experienced studying your website articles. Any way I’ll be signing up for your nourish and I wish you publish again soon. Big thanks for the useful info. Dr. Phillips roof repair

  53. I have now efficiently shifted my weblog without in contact with only one rule in my data source information, thanks for this tut, significantly appreciate it. bouteille de champagne personnalisé

  54. I did is on the cpanel i copied and copied and copied and pasted all the details and designs onto the new industry ok but now what i want to do is manage to alter the following. maybe i can help you

  55. If you want to buy essays now from our reliable custom writing company, you will also get some special features absolutely free. Purchase essay today and get 15% off on you paper. You can save your time and money with us! Get the best essay writing at reasonable price. Best essay writing service

  56. Please suggest me on what can be done as i do not wnat to re existing all the pictures and information again onto the new sector. free ps4

  57. you will also get some special features absolutely free. Purchase essay today and get 15% off on you paper. You can save your time and money with us! Get the best essay. Horseboxes

  58. What happens when you take one number of playwrights and another number of makers of technological innovation and toss them in a space together for several days. http://www.newbodybootcampnyc.com/

  59. Thanks you so much for sharing us very new new things we are recommending to visit your blog again and again. Situs Indonesia

  60. Hi there! The team of special-essays wishes everybody GOOD LUCK! If you have some difficulties with your tasks, you can always get valuable assistance and useful tips from professional writers and editors.

  61. His tv composing attributes consist of an display of Fall The Defeat and his stereo attributes consist of Afghanada (WGC award) for CBC. web design manchester

  62. An initial every quarter money outcomes of 15 pennies per common discuss will be paid on Sept 20, 2013 to investors of record as of the close of company on Sept 10, 2013. Judi Bola Online

  63. Normally you’d have to edit the database to do this, and it’s something I do a lot. Buy Twitter Followers UK

  64. I was looking for information about this topic and this post really helped me a lot. Thanks for sharing.
    Hotel Perla Mamaia

  65. Special thanks for showing this plugin before it’s published date.

  66. I have now successfully moved my blog without touching a single code in my database files, thanks for this tut, greatly appreciate it. water pipes wholesale

  67. Well knows this brand because of its popularity. Some claim that Apple products are the best even though it requires a lot of money from your pocket. Expensive for Apple is equal to best quality Accident Claim

  68. This is the most good article I’ve ever read today and this week! I’d like that you continue to give such amazing articles to us and we’ll be pleased by it

  69. Wonderful blog! I certainly adore how it is straightforward on my eye balls as well as the particulars are properly written. Thanks Regards..

  70. I just wanted to make a quick comment to say I’m glad I found your blog

  71. Well That’s things i was trying to find. I like your site and that i appericiate your time and efforts. Your article is extremely useful for me personally Thanks Regards..

  72. Good information. Address the best essay writing service to get more information

  73. hello!! Very interesting discussion glad that I came across such informative post.

  74. Took me time to read all the comments, I do wish there were more people like you around on the inter webs. Thank you for the great article I did enjoyed reading it iherb coupon

  75. Everything would still appear at http://www.ilfilosofo.com (the “home” setting), but the files would actually be at http://www.ilfilosofo.com/wp (the “siteurl” setting). Normally you’d have to edit the database to do this, and it’s something I do a lot. Form 990n and

  76. You have done a great job. I will definitely dig it and personally recommend to my friends. I am confident they will be benefited from this site. http://www.online-videothek-test.org

  77. A super effort to share the wonderful capabilities of WordPress, I am sure like me, most of the IT geeks have no idea about this particular shortcut, I will surely share this with my friends and peers. Maytag Quiet Series 300 manual

  78. You have so much knowledge about this issue, and so much passion. You also know how to make people rally behind it St George New Homes For Sale

  79. Just wanted to let you know that the pagination is not working on the homepage.

  80. Every once in a while, somebody finds a need to manually change (or fix) these settings. Usually this happens when they change one or both and discover that their site no longer works properly. This can leave the user with no easily discoverable way to correct the problem. This article tells you how to change these settings directly.purchase assignment

  81. Usually this happens when they change one or both and discover that their site no longer works properly. simple nail designs

  82. nice site i like your post but this sentence in very impressive for me “The “siteurl” option—or what’s called “WordPress address” under the admin options menu—is a database value that refers to where the actual WordPress files live, as opposed to where the site appears to be, which is the “home” option (called “Blog address” in the options panel)”
    Nice Please Keep Continue
    Thanks for Giving Nice and informative Information

  83. You know your projects stand out of the herd. There is something special about them. It seems to me all of them are really brilliant! traffic generation

  84. Well I have also bookmarked you for checking out new posts. I used to be able to find good info from your blog posts cheap dresses

  85. There are a lot of blogs and articles out there on this topic, but you have captured another side of the subject. This is good content thank you for sharing it. how can i get my body to burn fat

  86. I share Joyce’s sentiments. Lots of Americans are thrown by the dynamics of class and standing that they encounter in Africa. Coming from America, its disappointing to be treated “differently.” But it takes a very long time to understand these complex social dynamics, it can’t all be blamed on the pith helmet.

  87. There are barriers, such as gender stereotypes and lack of male role models, but with many individuals, these barriers have become an important reason to tackle them. identity theft attorney

  88. Police have released video footage of a group of suspects they are looking to question. No arrests have been made in connection with the attack. Click here

  89. this awesome blog are literally wonderful in addition as considering the very fact that filled with normal rock. Do stating and conjointly this surely i’ll fully modify your blog. hope u well there. thanks,,surf camp Algarve

  90. Nice knowledge gaining article. Tis post is really the best on this valuable topic.
    free classified ads

  91. I have been searching for hours and I haven’t found such awesome work.
    cooking recipes

  92. This is such a great information for me, because i do an online job thats why i need fast Internet connection, i search how to bost internet speed then ireach at a right place.
    Hotel Liebenwalde

  93. You entirely correlate our anticipation plus the breed of our info.
    now

  94. if I have my site located at http://www.ilfilosofo.com, it would be easier to keep track of WordPress files, manage upgrades, etc.
    hotel wien

  95. As we age this careful system changes. Moreover to monitoring moment-to-moment threats such as an beginning car or a decrease banister, our threat verifying starts to intuit a distant but progressively approaching dark thinking — the approaching end, the biggest boundary. criminal defense lawyer

  96. website has very good content. Please let me know if you’re looking for a article author for your weblog. So I am sure this website will form the well-known in the future. Someone I work with visits your blog regularly and recommended it to me to read also Wholesale

  97. if I have my site located at http://www.ilfilosofo.com, it would be easier to keep track of WordPress files, manage upgrades, etc
    site

  98. I surmise I haven’t interpreted specified matchless natural anywhere added online.
    relationships

  99. The DVD rental organization strategies to hike up its monthly costs for its 23 thousands and thousands in United States and Canada. film streaming

  100. Thanks for sharing this interesting blog with us.My pleasure to being here on your blog..I wanna come beck here for new post from your site. tjsjs

  101. Great beat ! I would like to apprentice while you amend your web site, how could i subscribe for a blog website Fruta Planta Pills

  102. if I have my site located at http://www.ilfilosofo.com, it would be easier to keep track of WordPress files, manage upgrades, etc
    recovering data

  103. I like what you guys aгe սsually սp too. Ҭhis kind of clever
    work аnd reporting! Қeep up tɦe wonderful ԝorks guys About us

  104. ‘Always use the word “Africa” or “Darkness” or “Safari” in your title’, it begins – and goes on to send up every imaginable cliché of writing about Africa. chin

  105. I really loved reading your blog.essays online It was very well authored and easy to understand.

  106. For example, if I have my site located at it would be easier to keep track of WordPress files, manage upgrades, etc.
    reservation

  107. The “siteurl” option—or what’s called “WordPress address” under the admin options menu—is a database value that refers to where the actual WordPress files live, as opposed to where the site appears to be, which is the “home” option (called “Blog address” in the options panel).
    Hotel Koln

  108. They can choose the structure of the design. Then decide the shape that they need. click here to visit the web site

  109. if I have my site located at it would be easier to keep track of WordPress files, manage upgrades, etc. SEO conference Las Vegas 2014

  110. if I have my site located at http://www.ilfilosofo.com, it would be easier to keep track of WordPress files, manage upgrades, etc.
    visit website

  111. Thanks for sharing very useful tutorial, also you must visit the best essay writing service online to find out more.

  112. Great post!,Thanks for sharing this useful information.We will wait for your next article soonly.Very nice and valuable post! Thanks for sharing this beauty-skincare

  113. This is a nice post in an interesting line of content, essays writing services great way of bring this Club topic to discussion.

  114. Its ideal location between Yio Chu Kang Street and Fernvale Road places it in the distance with comfort access to recently function Greenwich V Shopping center across the way as well as the long run future mall next to Fernvale LRT. corsets

  115. It’s a Very informative article, all the information are resume writing services given very clearly. Awesome blog.

  116. I have found very useful information over there, thanks for sharing this.
    Leasingfonds

  117. Since I’m frequently editing the database just to change the “siteurl” and “home” options, what I’d really like is to be able to set them in wp-config.php.
    Free PDF Ebooks

  118. Nice to be visiting your blog once more, it continues to be months for me. Nicely this post that i’ve been waited for so lengthy. No Win No Fee

  119. I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.wireless headphones for tv

  120. I feel really happy to have seen your webpage and look forward to so many more entertaining times reading here. Thanks once more for all the details. Cara Cepat Hamil No Win No Fee Claim

  121. I’m frequently editing the database just to change the “siteurl” and “home” options, what I’d really like is to be able to set them in wp-config.
    MyFitnessPal

Post a Comment

Your email is never shared. Required fields are marked *

*
*

3 Trackbacks