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

I have change the main URL of my wordpress theme. I accessed Admin area => Settings => and change my URL from : www.sampleURL.com to www.sampleURL.com/?page_id=2

and now every time I enter www.sampleURL.com/wp-admin i get directed to www.sampleURL.com/?page_id=2

Please help!

share|improve this question
Can you get to the following URL? www.sampleURL.com/wordpress/wp-admin/options-general.php If so, change the setting back from the admin panel. – Chris Carson Aug 8 '11 at 4:12
up vote 3 down vote accepted

Not sure why you would want to make that change, but if worst comes to worst, you can change it back via the database. Assuming you can access your MySQL database directly, simple navigate to the wp_options table and change the value of siteurl and/or home to your desired values.

EDIT: Alternatively, if you can access your code, in the theme's functions.php file, add the following code.

update_option( 'siteurl', 'http://sampleURL.com' );
update_option( 'home', 'http://sampleURL.com' );

Obviously, swap http://sampleURL.com with your URL. Then refresh the home page of your site a couple times. Once everything is back to normal, remove this code.

share|improve this answer
I can't access my mysql directly. :( I only got ftp connection, where would I go it I want to access my mysql? – winona Aug 8 '11 at 5:33
Well that depends on your host. I assume this is a self-hosted blog? – Chris Aug 8 '11 at 5:35
yes. it is..... – winona Aug 8 '11 at 5:36
Do you have access to the theme files via FTP? i.e. can you modify the code? – Chris Aug 8 '11 at 5:38
yes I can access and modify it. – winona Aug 8 '11 at 5:40

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.