I see this one happen all the time over on the forums. I changed my blog URL and now I can’t access my site/can’t access my admin/my styling is all jacked up, etc. This happens a lot because host automated installer scripts often put your site in a WordPress folder, so your URL ends up being domain.com/wordpress or something like that. The important thing to know here is that you can’t just change this URL. It actually points somewhere, it’s pointing to your WordPress files on your server.
Luckily, this isn’t real hard to remedy.  We’ll start off by trying to stop the problem in the first place, if it’s too late for that we’ll fix the problem. Don’t just change the URL. There is a process in place. You have 2 options. You can move your WordPress install entirely to root (public_html, html) or you can mostly leave your site in its folder but run it from root. Root here is your base level server web-accessible folder. What that means to you, is the site would run from domain.com. No extra directory like /wordpress in the URL. Before we get started, lets look at the codex. These 2 selections tell you how to move WordPress, or how to leave it in its own directory, but run from root.
The first link is pretty self-explanatory. If you want to move your install to root to run your site from domain.com, just follow those instructions and you are all set! The second link is not  so easy. The process is easy, but the article was authored from the perspective of having your install already in root, and wishing to keep running it from root, but moving your files to another directory. I like this option as it keeps your files less cluttered. You may run many domains from one host/server, or many software/website options. So I like to have each in their own folder. It’s best to read and understand the instructions from the second link, but here’s a quick overview of how to use the instructions if you are already installed in a subdirectory (like /wordpress) and want to leave your files there but run from root, domain.com.
- Leave WordPress URL set to the location of your files (like http://domain.com/wordpress)
- Change the Site Address URL to root (http://domain.com)
- Save Changes, Do not worry about any error messages you may get, or anything acting up)
- Copy your index.php (the WordPress main one, not the one in your theme) and .htaccess files (you will only have one if using pretty permalinks) to root (html, public_html)
- Open the index.php file you just copied to root in a text editor
- Find the line
require('./wp-blog-header.php');
- Edit that to read
require('./wordpress/wp-blog-header.php');
- Now you can login to your admin section, it’s important to note that your site is now accessible at domain.com, however your admin section still runs from domain.com/wordpress/wp-admin
- Head to the permalinks menu and update your permalinks. You may need to save them to default then back to custom
That’s it! Not so hard either way! OK, that takes care of the setup. But what if you already changed your URL and can’t get into your site? This is really easy actually. You won’t have access to your admin panel, but you can simply change your URL back to original using phpmyadmin, or an edit to your wp-config file. The options are all listed here. Use one of the methods, change your URL back to original and once you have access, if you want to properly change your URL use one of the above methods.
Thanks for your comment on the forum and this detailed information … appreciate it!
Best,
Christine
Any time! I’m always hovering around the forums trying to help. It’s how I learn. Plus a lot of forum members have helped me when I didn’t know a thing about WordPress, now I get to pass that along.
Nice write up! I think there should be a warning above the WordPress address (URL) and Site address (URL) so users don’t take it lightly when changing these values.
Yeah, I’d have to agree! Something like: Hey you! These URLs point to important stuff, like the physical location of your files. You can’t just change these without actually moving the files!
Or maybe something a bit more professional…
Thank you for taking the time to look at this problem. I have been trying to migrate I have used http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory as instructions to move a small site as a test tasteoftwinlakes.com and also installed your plugin which are the same as your directions. All worked just fine. I then tried exactly the same thing with a large site (for me) that had originally been done in MS Expression hillnhollowquilters.com and it is still coming up as the old site. I have been working on this problem for a week and can’t seem to make any headway. I have posted this to the bytesforall forum as well as getting support from GoDaddy where it’s hosted to no avail. I have changed the site url on the General Settings page back to hillnhollowquilters.com/wordpress so that the users can look at the changed site. Both the old and the new are still available.
When you say ‘the old site’ you mean there is already a website at hillnhollowquilters.com? If so, after doing the ‘giving wordpress it’s own directory’ instruction, do you remove that site? If you have an index.html file there, as well as wordpress’ index.php file, the index.html from the old site will load instead of WordPress.
hey i am just wodering i am having the same problem as you are, was wondering if you managed to fix the problem ??
Hey Rev. Voodoo.
Regrettably I changed both my WordPress URL and my Site Address URL in my Admin/Settings to fiberbooth.com.
Now, although the site can be accessed I have lost all the formatting and more importantly I can’t get into the admin panel.
Before I do any more damage I was hoping for some help…….any would be appreciated!
I own fiberbooth.com which I redirect to this directory where I have installed WP.
The reason I was mucking about in the first place was I was getting some good traffic but it was referencing the sub directory and I wanted it to be showing fiberbooth.com in the search results.
No expectation but I could use some advice, thanks in advance for any.
Well, the URL in the admin panel must point to the actual files, as stated above. Have you read through the above articles plus the links in there? There is a specific process for actually changing your URL. You must move the files to reflect the change in the URL. If you read through my article plus the codex links and can’t figure it out, let me know and I’ll try to help. But really, I would be repeating myself.
I cant get into my link. Please locate the problem
What have you tried so far?
You can fix it by adding this code http://codex.wordpress.org/Changing_The_Site_URL to the wp-config.php file.
Russ
Yup, that will work a lot of the time. It depends on exactly what has been done so far. If you just mistakenly changed URLs in general settings, that code should suffice. However if any files were moved or anything, that may not be enough.
I found this the simplest way to fix my problem. Needed to modify mysql db, but didn’t have phpmyadmin installed, so this was great for me. If a complete newb like me, don’t forget to login to mysql first…
SSH to your server, then run
mysql -u root -p
(password is whatever mysql root password was set to)
USE wordpress
(gets you into the wp database – if you called it that of course)
The rest is from here… hope someone finds it as useful as i did….
http://www.networkforensics.us/2010/11/update-wordpress-home-url/
Yup, works great if you have root access, and the ability to access you DB that way. I’m on shared hosting, as a lot of newer WordPress folks are, so my tut was aimed at the masses, thanks for the info!
Thanks so much for this post! Extremely easy to understand. However, even after following the steps to “giving WP it’s own directory/leaving files there, but run from root”, most of the pages in the http://www.precisionbehavior.com site are found and linking correctly except the MAIN navigation sub pages: ABOUT, ENDORSEMENTS, PARTNERS, NEWS, SHOP & CONTACT. If you click on any other link on the homepage, you will see they work.
I updated the Permalinks to Default, the back to Custom as instructed. If I put them back to Default, everything links correctly.
I thought it might have something to do with the CUSTOM MENU structure the the MAIN NAV is created with, but the SIDEBAR menu on this page is ALSO created with a CUSTOM MENU and it links just fine: http://www.precisionbehavior.com/whale-done-parenting-programs/. It makes no sense? Any ideas?
Also, I have a clean-up question: Are we supposed to deleted the .htaccess and index.php files that are WITHIN the subdirectory with the WP files? I COPIED them to the root as instructed, but should they now be deleted?
I figured out why some of my pages aren’t loading correctly. I still had old sites files in the root and the ones that were named the same as the permalink names were the ones not loading. i.e., about.php, endorsements.php, partners.php, news.php, shop.php & contact.php.
I had already set up 301 redirects with the .htaccess file for SEO & Google indexing purposes; however, I needed to delete these files in order for the new pages to be found. It was either that or rename the new page permalinks (about-us, pb-endorsements, etc.)
If this site was on a Windows server, I wouldn’t have wanted to delete these files, because redirects are done through IIS on the specific file itself. In that case, I would have changed the page permalink names.
Hope this helps someone else out there
thank you for letting readers know what was up!!
Right i have followed all the help links on these forums and nothing seems to have worked, like moving the wp-index.php etc
background:
i have an old website http://www.bclhydro.co.uk check it out … not very good, and i have created another website called http://www.bclhydro.co.uk/wordpress, now i want to like swap them round kind of so when you click on bclhydro.co.uk you get the good new wordpress site and not the old rubbish site.
i am using c-panel as my hosting thing, so have to keep changing the settings back via phpadmin
i have tried moving the index.php file to the www directory and changing the ,./ wordpress/wp-blogheader.php etc but nothing really happens the main page still changes the same i.e the old one and the new data all comes out in the form of the old website so all over the place and rubbish, rather like arggghhh with it all. aso my .htaccsees file doesnt have anything in it.
would love some help on the situation, aslo i am a bit of a newbie at this stuff
So did you first move the old site out of the www directory? You would do that, following the moving WP instructions and then log into your new site, and change the site address url to just http://www.bclhydro.co.uk, leaving the other as http://www.bclhydro.com.uk/wordpress. Once the URLs are changed, you would move the index.php from wordpress to www folder, and then edit the index.php to point to the wordpress folder. After doing that you should be good to go.
Thanks for this info. Trying this now.
Great! If you run into any issues, let me know!!
Came across your site when trying to find information on how to move files to root directory.
Initially when installing wordpress I set it up in a sub-directory so I could build the new site before removing the old one. Once the site was ready, I wanted to move the sub-directory to the root directory so that the side was accessed through http://example.com instead of http://www.example.com/wordpress. Unfortunately I am not that computer savvy and it turned out to be more difficult than I anticipated.
I was able to set move the index to the root folder so now those searching for my site will be able to access it through http://www.example.com but all the other pages remain in the subdirectory. I did attempt to move them once–lost my site and access to wordpress/wp-admin and was able to change everything back–but I would really love to resolve the issue and I am afraid of screwing it all up again.
I have attempted to follow the directions from wordpress, http://codex.wordpress.org/Moving_WordPress but I am getting stuck along the way:
1) Settings-General: wordpress address url–changed to http://example.com and site address url was changed to http://example.com–saved changes–but alas reverts to old address http://example.com/wordpress
2) moving files–do I move everything to the root folder?? I did that last time and lost the site and access
3) I don’t have a .htaccess file–what is it and do I need it?
4) Is there any option for backing up–uninstalling and then reinstalling to root directly?
Obviously, I am a newbie and I would appreciate any help you can offer even if it is a reference on where to find help.
1) wordpress address – http://www.example.com/wordpress
site address – http://www.example.com
Save the settings. At this time, WordPress will break. That’s cool.
2) Move index.php from /wordpress folder to root.
3) edit index.php as detailed in my post above (and in the codex)
4) .htaccess control pretty permalinks. You don’t need it until you turn them on in settings -> permalinks (don’t turn em on until you’ve moved)
5) there is an option to backup and reinstall… it’s harder. What you are trying to do here is the simplest way.
It’s really as simple as changing your 1 URL, moving index.php, and editing it.
Thanks for the quick reply. My index is already there –but all other pages/post info contain “wordpress” in the url (they remain in a sub-directory–even after accessing the site and hitting the “home” page you will see http://www.example.com/wordpress).. I have been looking at this for weeks now and I am hoping to find a step by step guide to resolve (the link for Moving files to root on wordpress was not helpful–I am sure I am missing something).
1) I have tried to change the site url to http://www.example.com (it switches back to http://www.example.com/wordpress after I hit save)
2) The index is in the root folder already (but all other files remain in wordpress subdirectory). I can access my site by http://www.example.com but all other pages and the home page open with http://www.example.com/wordpress/postname (on one hand I am grateful I can open and access the whole site, but I would love to get rid of the “wordpress” tag in the url).
3) the permalinks are already set to post name; I assumed because they remain in the subdirectory that is why the url is http://www.example.com/wordpress/postname. If I want to eliminate the “wordpress” in the url do I need to move all the folders to root? Does it matter that the permalinks are there?
4) I did have to use your instructions to access my admin page after originally moving the index file–thank you!
Casi
OK, I was just going to ask if you had permalinks set up. How are you moving your files around? Are you using FTP? .htaccess files can often be hidden, and your FTP software may need to be configured to show hidden files. Then you could move your .htaccess from /wordpress to root. Or, I believe just switch permalinks to default, save, and then back to postname should regenerate your .htaccess file as well. Get that .htaccess file moved, and then try to swicth the one URL again.
Dude, once more, you are my hero. Thank you a million times! I spend days trying to do this but was not unable to. Once more, you have managed to save the last strands of hair I have left. Your instructions were so easy to follow. Where would I be without my Reverend? Thanks for also taking the time to write this article, I really appreciate it. Have a nice day.
lol! Thanks for letting me know it worked for you! I’m always happy to help!!
My webhost installed WordPress into a folder named /blog2
I was roaming around the settings area and found two fields on a form that allowed me to change the URL of the blog. (Or so I thought.)
I changed both of these fields from: domain.com/blog2 –>to —> domain.com.
I thought this would allow me to go to domain.com and see the blog. But now I can’t log into the wp admin. I get a page not found after I enter my login and password.
Check out the bottom of the post up above. That’s exactly what we are talking about. Click on the link at the bottom of the post to get to the instructions for how to change your URL back to original (it’s gotta be done manually, through the backend). ONce it’s all fixed, the article discusses options for properly changing out of that subdirectory.
Two questions Rev. If you do the change from .com/wordpress to just the .com as outlined here, would the images you loaded also serve with just the .com.
And, do you anticipate any issues if you are using a CDN.
Did it and all seems to work well. But, will google recognise this as a 301 or as duplicate content because all my index files in Google have the wordpress folder in the URL
To be honest, I’m not sure anything about how Google recognizes things. I don’t think duplicate content will be an issue, as Google recrawls and updates your URLs….
Thanks Rev. I have just one lingering issue. All the posts redirect well enough but anyone who once accessed my homepage at example.com/wordpress now receive a 404, but anyone who tries example.com/wordpress/postname redirects perfectly. Any ideas on that?
hi i just stuffed up my site so bad from this. im not a coder i just want to press a few buttons an setup ma site, and i dont want the stupid /wordpress all thru my urls. i was forced to instal wordpress to a subdirectory from my cpanel and now im left having to stuff around moving (NOT COPYING) and copying (NOT MOVING) files an im just left thinking wordpress r dumarses. the option to change the site URL in the admin is there, but it doesnt work. i then have to search for further codex site instructions, and having followed those it still doesnt work. i cant even login. im clearly doing something wrong but im gona blame wordpress anyways. i find it funny in their instuctions they actualy say, ‘oh dont worry your site will give u some error but yeh’ i thin they are dumbarses this is 2012 i just dont get why it should be this complicated
The option to change the URL is in the admin…. and it works. You just have to understand how it works. LIke I explained in my article, the URL points to the physical location of your files. If you just change the URL, it won’t point to your files anymore. — It would be like changing your address, but not actually moving. ANd still expecting your mail to show up at your old house. Your address and your physical location have to match for things to work. The simplest instructions for getting /wordpress out of the URL are here: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install … and of course your site would throw error messages while being moved. For a short period of time, the address in the admin panel, and the physical location of the files will not match. That isn’t WP being unnecessarily complicated, it’s just how the internet works. Change the address, then move files, or move files then change the address … either way, things will be out of sync momentarily, causing error messages.
Hi – sorry to bug you with this but I’ve read and re-read your article and the various comments but can’t get this to work! I’ve tried both copying and moving the index.php file from duoderazey.co.uk/wordpress to duoderazey.co.uk and have altered and checked the php file as instructed. I’ve also changed the site address to remove the /wordpress/ url but I just end up and my host’s (LCN) holding page for http://www.duoderazey.co.uk.
I have default Pretty Permalinks and can’t find the htaccess file (using Filezilla) so presumably it doesn’t exist yet (have never used Pretty P)
If you have time/patience I’d be grateful for some thoughts.
Thanks – Nick
Further to above turns out from my host that because the /wordpress extension is written into a CMS database there is no way that the above instructions will work. The only route is to move the wordpress folder’s contents to root and amend the database. Ah well….
Since I wrote my original article above, the help files had been amended:
http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install
Which really should work for you. Also, you won’t have an .htaccess file chances are, if you never changed permalinks from default.
It really should be as simple as changing the WordPress URL to the domain you want without /wordpress (leaving the site one referencing /wordpress since that’s where your files would be), copying the index.php from /wordpress to root, and amending it per the instructions to point to the /wordpress directory. Set up that way, it should all work!
thank you so much !!! i changed the URL in error, messing around when looking to re-direct a domain name. Then all the bad things happened ! ha
First i got locked out then the formatting went nuts – following your steps solved it and have prevented me from throwing my laptop out the window – thank you for saving my universe!
Hey, I’m glad this article helped you!
Hi – thanks for your reply. In the end I had to leave it to my web host to sort. I’m not sure why your/wordpress instructions didn’t work and I’ve asked my host to tell me what they did but I must have tried 5 or 6 times to get it to accept the changes made to the index.php. I tried both copying and moving the file but…. As you’d expect, double checking became triple checking etc with every try! Anyway, all is working now.
Bummer the normal techniques wouldn’t work for you!! But, you’re back in action, that is the important part!!
Help ! Please I’ve tried to do all the things you wrote and nothing worked ! I have messed up with urls in the WordPress admin and I can’t access to nothing at all now. Also something weird is that when I try to access anything, I just end on this webmail page of my host.
You can check it out here : http://www.anacondacosmica.net . There are two websites, one old and one new, the new one is in anacondacosmica.net/en/ and I wanted anacondacosmica.net to land on /en/#!home/ but things blew out.
Can you help me please ? It’s for a customer and his website’s down now :(( Thanks !
I see a website at the .com address, and a different one at the .com/en URL. Did you get everything sorted out?
Hello,
Thanks for your quick reply. Yeah websites appeared again, don’t know why, but it’s a good relief They weren’t working at all when I wrote you.
Yeah there are 2 websites, the old is at the root .net, and the new one at .net/en/ , and I want the new one to be accessed directly through the root (anacondacosmica.net leads to anacondacosmica.,net/en/!#home/)
I tried changing htaccess but no success. Do you have an idea ?
Thank you very much.
Well, what are your plans with the old site? If you already have a site running in thr root, you have to move it to run the new one from root. You really should be able to just change the /en install’s Site URL to not have the /en in it. So WordPress URL would point to the location of the files – domain.com/en and Site URL points to root, domain.com. Then copy the index.php from /en to root, and edit it to point to the /en directory. But obviously you can’t have 2 index.php files in root. So once you point index.php to the subdirectory, the new install will work and the old install will not. You can also move the old install entirely to a new directory – then move the new into root.
Okay. So if I understood well, I move the old one (I’m not interested in it anymore) to another directory so that it empties the root, then copy index.php of /en/ to root and modify it to lead to /en/.
What kind of changes I have to make to the rooted index.php ? Change this line : require(‘./wp-blog-header.php’); to : require(‘./en/wp-blog-header.php’); ?
Do I have to change .htaccess ? Thank you very much for your reply !
If you aren’t interested in the old site, yeah, just throw all the files in a zip archive and store em somewhere. Then you are basically performing this right here:
http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install
Which is the process I describe in my above article (when I wrote my article, that wasn’t there yet!). So yeah, change the 1 URL in settings, then copy over index and .htaccess, then edit index – which you seem to have figured out correctly! You shouldn’t have to change the .htaccess. After completing your changes it would be wise to visit settings/permalinks and just hit save to make sure everything is properly set up.
Yeah indeed it seems to be this procedure. I’ve tried that yesterday but ended up in a complete mess. Now that everything’s back to normal, I will try that now. I’ll keep you informed, I hope it doesn’t mess up again the whole stuff.
Thank you, I’ll tell you when it’s done.
Okay… I’ve done all of it and it doesn’t work. I’ve deleted (after backup) the old website in root, then changed the site url in admin, and copied htacess into root, along with index.php that I’ve modified.
And it doesn’t work, I have a weird url showing : http://www.anacondacosmica.net/en/?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=?_escaped_fragment_=www/
For you to know, the website is hosted in OVH, which has a folder called ‘www’ where the root files are hosted. So when I say root, it’s in this ‘www’ folder, as I’m doing usually. In the true root, there is another htaccess which I didn’t modify, and in it there’s :
SetEnv PHP_VER 5_3
SetEnv REGISTER_GLOBALS 0
And in the htaccess that I copied to the ‘www’ root, there’s :
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
Do you have a clue about what’s happening ? I didn’t know redirecting would be this tricky.
Thanks !
Are you able to get in to your admin panel at all to reset your permalinks? If not, deleting your .htaccess in the www directory would do the same thing. I’m not sure what is so goofy on your install… everything you’ve done looks right, and it should not be so difficult. I’ve done this plenty of times!! When I first visit your site, everything is fine – things don’t act up until I visit that blog page. Also, www is your web accessible root, which is what I mean when I say root. Not your personally accessible root directory. Root is usually www, html, public_html
Oh, it seems more complicated than that. I’ve just done the test with another browser (safari), and the ‘anacondacosmica.net’ works fine. But ‘anacondacosmicacenter.com’ gives this weird url I gave you.
I need to be more precise here : there’s also a new url for this website, the .Com one, which leads to http://www.anacondacosmica.net/en/#!home/ , which is the true adress I want to display as home (because withtout the #!home, the page doesn’t display)
My customer wanted a new adress in .Com so I bought it and did a redirection on the #!home , but I wanted also to drive the .net to this same #!home, so that users using .net all land on the same homepage.
Sorry to get all complicated So what I’m aiming for is that both ‘anacondacosmicacenter.com’ and ‘anacondacosmica.net’ lead to ‘http://www.anacondacosmica.net/en/#!home/’
For now, .net is leading to only ‘http://www.anacondacosmica.net/en/’, hence not displaying the right homepage, and the .com is showing a weird ‘escaped_fragment’ url.
Can you help me through this mess ?
Yeah, this is totally different than the original road we were heading down. I was just trying to get you with files in the /en directory, running from root. Hm… so what I wouold probably do first… is get WP running normal without worrying about the extra stuff on the URL, and the extra domain. Once that is established set up some redirects. Can you redirect your main domains from the actual control panel? Like forward them both to the actual URL you need? If not, you can probably do it in the .htaccess file … I’d have to look in to how to get that redirect set up. For instance, reverendvoodoo.com redirects to this site using:
before the start wordpress line.
Hello,
Um… What do you mean by running WP normal ? It runs fine on http://www.anacondacosmica.net, and I can access to the admin panel on this adress.
And about redirecting from control panel, do you mean from the General Settings ? I don’t see how can I forward them to #!home from the panel, if that’s what you mean ?
Maybe I have to change the .htaccess. I’ll try that later. And thank you, I’m sorry for bringing such complicated issues.
Yeah, I basically meant first I would just make sure wordpress works, without any additional redirects or the #home you need. Sounds like you are good there, then handle the redirects. By control panel, I wasn’t clear. I meant the domain control panel. Like I have some domains on bluehost, and some elsewhere. I can redirect those domains through that control panel to any URL I would like.
Oh you replied when I was posting my other comment. Yeah I can access the admin panel still, and I did save permalinks as you told me.
Oh ok I understand, I was thinking about it too. I will try this and tell you if it works ! Thanks for the advice !
Hi! thank you for your post.
I accidentally changed my url in url settings and I couldn’t access to my website because it was redirecting all the time. I solved it editing the ‘functions.php’ archive of my template, adding these two lines on the top:
define(‘WP_HOME’,’http://example.com’);
define(‘WP_SITEURL’,’http://example.com’);
Now I can access to my website but only the home page works, I mean only ‘www.example.com’ works but ‘www.example.com/portfoliosets/video’ or ‘www.example.com/about’ don’t work and I got a message error.
Could you help me please? Thank you in advance!
In settings->general, are your URLs back to the way they were originally? I believe that when you ad the code to functions.php, it should update those settings. But they will be greyed out I think, and not editable. I believe that now that you have the access back, you can remove the lines from functions.php. They are just needed one time to fix things. What I would try to do now, is go to settings -> permalinks, and set them back to default. Save, then test your site. Then set your permalinks back to custom which will hopefully fix everything. If that doesn’t work you could let me know your site URL so I can see if I notice anything odd with how the URLs are forming.
I tried to do change permalinks to default and it worked perfectly.
Thank you so much!
I’m glad you got everything sorted out!
I tried to change permalinks to default and it worked perfectly.
Thank you so much!
OMG!!!!!! Thank you!!! I can’t believe it was this easy, this has been bugging me for so long, and all the worthless step by step “tutorials” I have tried have just made me frack everything up. With your guide I made it in just one simple try!
I now have a blog without the wordpress…
Amazing – thanks so much again!
I’m glad this tutorial worked out for you!!
Great blog Rev! Lets see if you can help me too? I recently added a sub-domain and just installed WordPress on the subdomain. All was fine until I changed my general settings for my domain from http://subdomain.site.com to http://www.subdomain.site.com. That “www” added killed my site and now I get nothing when I try to access my subdomain. I looked at my database Options but the site shows the “www” and no problem there. Any other suggestions to help me get my subdomain site back? Thank you!!
Sorry it took so long… I have been traveling on business and haven’t been able to log in to my site. Are you still having this issue? If so, I have a small edit for your .htaccess file that will help!
Thanks, thanks. I am totally inexperienced in website creation. The things like “copy to to the root” are like Chinese language to me. What is “the root”, my friend? To regular people this is a puzzle.
However, the magic happened! I have transferred the files, whereas I have destroyed twice the whole site and re-installed it again.
A small tip to people like me: use Filezilla program for backing up the files to your computer in case things will be changed beyond repairs. This way you can move them again from your computer to your server unchanged and start the exercise again. :))
Thanks again and have a nice weekend folks.
I’m sorry! The posts here on my blog are old and maybe not well written. ROOT = the top level web accessible directory… you might need to check with your host to see what this is – it is normally named www, html, or public_html. I was traveling on business, but have now returned to my websites….. if I can help you further, please let me know! You can also check out http://voodoopress.com which is my WordPress website! If you don’t find what you need there, just ask! I’m always looking for new ideas for articles!
Hi There,
Nice job. But I have a question. I have installed my theme in http://www.X.com/myFolder but the website domain I am using is http://www.Y.com. Now, when I enter http://www.Y.com in the browser, The site home page url is correct (www.Y.com) but as soon as I click on the menu to go to any other page, the url is changed to http://www.X.com/myFolder/pageName
Is there any way that I can fix this issue easily to just show http://www.Y.com/pageName in the browser url?
Thanks a lot for your help
Hi Rev,
My apologies on my being a total novice here, but I’ve been tasked with running a charity website and was attempting, foolishly, to change the way the url appeared. www instead of wp. I’ve locked myself out as above. I’ve been trying to get in for hours now, but I’m very new to all this and the site was set up before my time with the group, so I’m less than familiar with it’s structure.
I’m attempting the edit wp-config.php method. I’m now able to login but the dashboard layout is all squirrely like the site itself. Have I screwed something else up in trying to fix it?
What was your original URL? was it something like wp.domain.com and now you want http://www.domain.com? If so, what is currently at http://www.domain.com?
I had added the necessary lines after the stop editting section, duh! (Although it’d help a noob like me if it mentioned that in the Edit wp-config.php as well as the lower relocation section).
I’m really cautious about messing with any of this now, but if I wanted to do what I thought I was doing, having the address bar read http://www.blahblah.com instead of wp.blahblah.com, would one of the above be the correct method? At present if people enter http://www.blahblah.com it redirects to wp.blahblah.com. The thought is that www instead of wp is more appropriate for a company.
Anyway, thanks for your guiding light anyway
No, those methods would not be the correct way to do it. You are trying to point your install to a place where the files don’t actually exist! Also, you have a subdomain set up through your hosting that needs to be un setup. when you see wp.domain.com, the wp portion is a subdomain. Basically, what happens when you go to http://www.domain.com now? Is there another site there? To get WP working from the www we need to unhook that subdomain, remove the code that was added to wp-config, change the adresses in general settings so that the wordpress address points to http://www.domain.com/wp and the site address points to http://www.domain.com, then on the server move index.php out of the /wp directory to the root (html, public_html, or www) directory. Then index.php needs to be modified similar to what is described in this article – pointing to require ./wp/wp-blog-header.php. It’s a bit complex because we are moving from subdomain to root domain.
This was a god send to me! I have been struggling with this issue and no feedback from the forums…. my issue was having 2 .htaccess files, one in the root and one in the directory and I was editing the wrong one, until I read this. Now it all works perfectly :0)
I am not able to aces my dashboard,it is showing the error–
Not Found The requested URL /wp-admin/ was not found
on this server. Additionally, a 404 Not Found error was
encountered while trying to use an
ErrorDocument to handle the request. Apache/2.2.24 (Unix) mod_ssl/2.2.24
OpenSSL/1.0.0-fips mod_auth_passthrough/2.1
mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server
at http://www.angelgeeks.com Port 80
I’d love to help, but you haven’t given me much to go on. Did you do something prior to the error? Were you trying to change the URL of your site? If so, then you can’t log in to your site… you have to fix things on the server side, which is what I’m talking about at the bottom of the article.
I love you.
Hello! This post was very helpful but I’m wondering if you can help me with a related problem. I am moving my site from WordPress to Behance ProSite, but I want to keep my blog content and keep it with WordPress if possible. How do I revert to a WordPress blog with a normal WordPress URL so that I can change everything else but have my blog still in place (and not have to pay to have it hosted anymore).
Hi,
I stupidly already changed the site url and the wordpress url and the main page loads (although content and imagery are skewed) but no pages work and more importantly I cannot access my dashboard. So you said “if it’s too late for that we’ll fix the problem” .. please help me fix it! I have read the posts and none seem to be the simple direct answer to the next stage you take for my problem – I am sorry I am so new to this. Thanks
Did you read the whole article? Specifically the last paragraph where I link to the instructions for changing your URL back to original. Get that done, and we can go from there!! Let me know if that works and I’m happy to help you further. We can even get that URL changed if that’s your wish
Hi,
Thanks for bringing my attention to the final paragraph. I have followed the steps provided by wordpress @ http://codex.wordpress.org/Changing_The_Site_URL but I am having issues with the part where you reload the edited admin-functions php file back to my FTP program, I am editing, reloading and tried dragging and dropping but when I refresh my admin page it still says “404 Not Found”.
Please advice how I successfully reload the edited file to my site.
Thank you so much.
Laura
Hi Laura, I’m sorry I’m always mobile when you comment, I feel like I don’t leave a property reply. Anyway, the file you mentioned above should never ever be touched. I believe you must have misinterpreted instructions somewhere. The only functions file to ever touch would be functions.php in your active theme directory
Hi,
I didn’t manage to upload the changed file so no damage done. I have now found the correct functions.php file and edited as per the article link. It has definitely done something because the “Page Not found” has gone away but now both my admin page and gymbunnykitchen.com/wp page just load and then are blank. Any suggestions?
Hi Voodoo, please help, I have not received a reply to my above email?
Thank you!
OK, let’s try to figure out exactly where you are at right now. So, you originally installed WP in a folder named /wp, correct? And then you tried to move it to your root folder and it all went bad, is that correct? Now we need to change things back to original first and then we can properly move WP, does that all sound right? Now, you didn’t edit the admin-functions.php file as you said, but you did edit the functions.php file in your theme per the instructions and it isn’t working? Do you know how to access your database through your host? That is really the easiest way to fix things.
Also, what did you put in your functions.php file?
update_option('siteurl','http://www.gymbunnykitchen.com/wp');
update_option('home','http://www.gymbunnykitchen.com/wp');
Would be appropriate for the functions file
Hi,
Thanks for your help so far with Laura’s site, I’m trying to help her sort it.
From what I understand, Laura has changed the URL in the WP admin interface from http://gymbunnykitchen.com/wp/ to http://gymbunnykitchen.com but the WP files are still in the /wp folder on the server. I guess this is why it is having trouble finding them?
I have added the two lines you pasted above to the functions.php of the active theme. However I still don’t see anything in the web page – I get a 301 on first request then 500 errors for following requests.
Do you have any other ideas for what I could try?
Thanks!
Bah. OK, well… assuming all the files are where they should be… the easiest and fastest method is to just do it in the database. I don’t know your experience level with webstuffs at all…. going into the database sounds daunting but it’s not at all. I don’t know who she hosts with, but every host should have help files to tell you how to get into your mysql database. Normally you log on to your host, and in the cpanel/main page you find phpmyadmin and log on to that. Over on the left is a list of tables, and you would look for the wp_options table. In there you would find various tidbits of information, but you would only be looking for the site_url and home_url rows which would need to be edited back to gymbunnykitchen.com/wp — the database way is the surefire way to do it, or to look and see what the url is set to. With the URL back to /wp in the database, you could remove the 2 lines of code in functions.php and everything should work as original. Just want to make absolutely sure that no files have been moved out of that /wp folder and no files aside from functions.php have been edited, correct?
I didn’t specify, but to get to phpmyadmin, you log onto your host at their website, not through ftp or anything like that. Simple web interface through the browser
Thanks. I’ve changed both of those in the database – still not seeing any update in the browser but will it take time to propagate?
Thanks again.
And also, as far as I know the other files have not been edited, and I reverted functions.php.
I tried those steps u have mention (copying index.php file to root directory n n making changes in the code)I still coudnt access my website without ”/wordpress ” plzz help:-(
Can be a bit of a tricky one, I used SuperTasker to find a wordpress pro, told them my problem and they turned it around in a couple of hours. Might be worth a go for you too.
If you just need a fix, hiring a pro is fine. But I honestly don’t recommend it for a lot of problems. It’s empowering to be able to fix your own site. Do some research, learn why problems happen, and very quickly you can be a WordPress pro!
Hello …
Your website very beautiful…
I am waiting my website thank you…
Hi, guess I’m not the only person to do this . . . so frustrating! A total newbie. TQ for helping.
I cannot get back into my site. I deleted the /server from the domain name & now I get an error page & can’t access the site. The above article didn’t apply to this situation as I could see. Please advise.
Dying on the vine, MC
Hi, thanks for this tutorial, I was looking for this info!
unfortunately, It didn’t solve my problem and I think maybe you can help me.
My wp installation is in its own folder: /var/www/wordpress and I made the copies of index.php and .htacess to the root folder.
The site adress (URL) in my wp settings is set to my domain: “surian.org”.
The problem is that if I change the wordpress adress (URL) to “surian.org/wordpress” I’m unable to login anymore, wp don’t recognize my user and recovering password dont work.
So, my wordpress adress (URL) now is set to “server_IP_adress/wordpress” and this way it works, but then my domain don’t appear at the adress bar, only the IP.
Whats going wrong here?
Thanks a lot in advance!
Hello,
This is an old thread by now but I’m hoping for some help. I made the dumb mistake of changing the site and home urls in the wordpress settings to remove the /wp. I used the phpMyAdmin to revert back to the /wp version in both siteurl and home url and now my home page is accessible again however all other pages and the admin page return a 404. Why is that happening? I just want to get back to where I was and then will worry about moving the url. Thanks for any help you can provide!
very thanks
First of all thanks you for your help.
I don’t understand line 2, change the Site address url? I to followed WP directions on changing the url and got lock out. I tried a couple other things, with no luck. I am not sure which url I am suppose to change now…do you mean in my pointing/forwarding access?? So sorry I am really a newbie and completely lost.
I bought a domain with wordpress and I tried to change the name of my website from valeriereinoso.com to vreins.com
There was an error. I am not using a normal wordpress theme, I am using Divi. What should I do to be able to access my website again?
Thank you very much in advance
Hi i hope this gets read by so e one who can help me. I run a wordpress through 123-reg and have changed over to a vps a few months back. Everythinghas been well until i deleted the word ‘wordpress from te url box in the settings page of wordpress. Yes, i got locked out and wp-admin page has dissappeared. Ive read tonnes of articles and gone into wp-options through php and added the wordpress back i to url and homepage boxes, saved them and still nothing. Not sure what to do now. Is this common solution not working due to me having a vos server??? Im totally at a brick wall with this
Hi there, I’m trying to achieve a directory move on two scales.
Firstly, I want the website to move out of the 2015 directory.
Secondly, I want to move the site to a new host.
The problem is every time I try to attempt the move using wordpress’s own tutorials the site doesn’t work. No errors appear in the browser, I just get a blank page. Could you provide any advice?
i tried to change the url in funtion.php file as i read somewhere that we can do it easily by using simple 2 steps i did and now i have lost the access to my admin panel .. i want my previous domain name back as it’s real irritating.. please let me know how to get that ?
Hi I managed to resolve the issues. Not 100% positive, but think it was more to do with website data and cookies etc as to why the problems appeared to persist. If you require any assistance, my URL is above.
I changed my wordpress url from http://sulovmullo.com to https://www.sulovmullo.com then i couldn’t access my wp dashboard. I changed url from the phpmyadmin. But it didn’t work. So please HELP me…. Site is too much important.
THANK YOU! I don’t know if you still use this blog or not, but you saved my night. I was freaking out because I’d broken my blog. WHEW! What a relief!!!
Help!
I changed the wordpress permalink in general settings and now when I even try to login, it says page not found. Is there anything I could do?
THat’s what the article addresses, exactly. Did you try the fixes?
If somebody can’t access any more after change…
http://howwordpressto.blogspot.com/2011/06/how-to-reset-url-wordpress.html
Thanks for the link, that information is out of the WordPress Codex, which is the very first link I give in my article as recommended reading.
I tried this but after changing my site permalink, the wp-login.php file is empty.
I cannot access the file to add any code to it either.
I cannot access the original website wp-login.php file at all.
If there is anything else you know that could possibly help me. That would be great thanks.
You wouldn’t ever edit the wp-login.php file. That wasn’t suggested anywhere.