My WordPress Website Does’t Work After Modifying URL in Settings

Please Subscribe to our YouTube Channel

WordPress is easy to use content management platform that doesn’t need knowledge of codings. However, you must learn some codings to be a good blogger There are times when websites crashes, stops working, the script gets broken, and you may be very helpless in these situations. Seeking help from a professional for every little thing will cost money.

Today we will learn about fixing the URL when you loose access to WordPress website because you made a change in URL. When you host a website it may or may not have www. WordPress let you type www in settings. In the same way, you can also type https:// instead of http://. However, these things may create trouble. Especially when you add https:// without having an SSL/TLS certificate.

Wordpress URL Fix

How to get back to WordPress Admin Panel after you change URL from settings and the website stops working?

  • You need to log in to your hosting account. For example, I have a hosting account with DreamHost, so I will go to Dreamhost Control Panel
  • Now Go to file manager. You may have different options depending on Hosting Service Provider. You need to go to the file manager of the domain that has the issue
  • Click on wp-content —> themes —> current word press theme —> function.php
  • After clicking on Function.php file, you will see coding. Take backup by downloading the file or copying the code.
  • You need to add the following code in function.php file
update_option( 'siteurl', 'http://example.com' );
update_option( 'home', 'http://example.com' );

Editing Function Php file

Note: Make sure you add the code at the start, right after <?php. Don’t forget to replace example.com with your own domain. If your domain has SSL certificate installed, replace http with https. You can also use www if you had it earlier.

  • Now save the function.php file

Now go back to your website, and it should be working. You can also access Admin Panel.