WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My Dad has a website based on wordpress, he went into the wordpress dashboard and modified the home page incorrectly appending an extra level to it, then when he exited it made changes resulting in website being messed up and more importantly the login to wordpress has disappeared not allowing him to change it back.

I manually fixed the url to display the wordpress dashboard login, yet even when login it doesnt work, it takes be back to the wrong page.

I don't currently have access to the wordpress database but I do have access to the files generated from the database so my plan was to edit the correct file to set the home page path back to what it should be, hoping that will then allow me to get into Wordpress dashboard. But I have very little knowledge of Wordpress, anyone help me here please.

share|improve this question

migrated from stackoverflow.com Feb 5 '12 at 0:06

This question came from our site for professional and enthusiast programmers.

can you get to the settings by appending this to the url ? wp-admin/options-general.php – zac Feb 2 '12 at 14:53
No, this is what Im trying painswickgolf.com/blog/wp-admin/options-general.php – user294896 Feb 2 '12 at 15:00
When you say he modified the home page, did he change home.php file or edit something from within the CMS? Did he touch .htaccess or anything in WP settings? – zac Feb 2 '12 at 15:14
He did it through the wp dashboard I think he just changed the value of something from painswickgolf.com/blog to painswickgolf.com/blog/?page_id=3 – user294896 Feb 2 '12 at 15:24
With the amount of information you are providing all I can say is get access to the database and change the data that you need there. Maybe in wp_options, check the siteurl value. If you need to change the path of specific page check wp_posts. – zac Feb 2 '12 at 15:42
up vote 1 down vote accepted

See Changing The Site URL « WordPress Codex for recovery instructions.

share|improve this answer
Seems like this would have been the solution, but unfortunately at his request I used a sledgehammer to crack a nut and dropped the database and reinstalled wordpress so this reply too late for me. – user294896 Feb 3 '12 at 15:52

Add define('RELOCATE',true); to wp-config.php

share|improve this answer
This is a good piece of info to share, but it'd be better if you added some explanation and context, or at least a link to codex.wordpress.org/Changing_The_Site_URL#Relocate_method – Ian Dunn Feb 12 '12 at 17:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.