2

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!

1
  • 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. Commented Aug 8, 2011 at 4:12

1 Answer 1

4

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.

7
  • I can't access my mysql directly. :( I only got ftp connection, where would I go it I want to access my mysql?
    – winona
    Commented Aug 8, 2011 at 5:33
  • Well that depends on your host. I assume this is a self-hosted blog?
    – Chris
    Commented Aug 8, 2011 at 5:35
  • Do you have access to the theme files via FTP? i.e. can you modify the code?
    – Chris
    Commented Aug 8, 2011 at 5:38
  • yes I can access and modify it.
    – winona
    Commented Aug 8, 2011 at 5:40
  • I have edited my answer with another solution which should be easier for you.
    – Chris
    Commented Aug 8, 2011 at 5:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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