Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Gedalyah (Gary) Frankel
PLUS
Gedalyah (Gary) Frankel
Courses Plus Student 7,234 Points

Settings > General Experiment Gone Bad

I took the "Learn WordPress" track and I created my first local website using DesktopServer.

I went to Settings > General and I experimented by changing the WordPress Address (URL) and the Site Address (URL) from:

'wpdemogf1.dev' to 'wpdemogf1a.dev'

I now can not access my website AT ALL.

Any advice on how to regain access to my website? Please?

2 Answers

Gedalyah (Gary) Frankel
PLUS
Gedalyah (Gary) Frankel
Courses Plus Student 7,234 Points

Hi Joel, First thanks for your reply. In the end I got really lucky. I opened up the DesktopServer and there is a small button in the lower left called 'Sites'. That opened a Chrome tab to 'http://localhost/' > Database > http://localhost/phpmyadmin/db_structure.php?db=wpdemogfDB0pjgs#PMAURL-5:sql.php?db=wpdemogfdb0pjgs&table=wp_options&server=1&target=&token=bce8f024d82881c2a61e8f4b12fb364f.

I found an option there to edit the 'siteurl' and 'home' options back to 'wpdemogf1.dev'.

It worked.

Joel Bardsley
Joel Bardsley
31,246 Points

A quick way to undo those changes - If your theme has a functions.php file, open it up and add the following lines (below the opening <?php tags):

update_option( 'siteurl', 'http://wpdemogf1.dev' );
update_option( 'home', 'http://wpdemogf1.dev' );

Save the file and you should at least be able to access your site again. Once it works, you can remove those lines from your functions.php file.

If the above doesn't work, this link provides several alternative methods you can try: https://codex.wordpress.org/Changing_The_Site_URL