How To Fix A Wrong URL Of The Homepage In WordPress

Last updated December 5th, 2023 23:57

The WordPress homepage is the page that appears first when you enter your domain in a web browser. WordPress has its own section in the settings dedicated to this page. Sometimes, the homepage can cause issues for many people. For example, when someone sets the homepage to use the HTTPS protocol but doesn’t have a valid certificate yet. Another problem can occur after migrating a website to a different domain, where WordPress stubbornly redirects to the old and original domain. Let’s see how to fix a wrong URL of the homepage in WordPress, using the MySQL database. It’s quite simple and can save you a lot of trouble.

How To Fix A Wrong URL Of The Homepage In WordPress

Perhaps you have encountered a similar situation. Your domain is functioning on the HTTP protocol, and your website does not have an SSL certificate yet. However, you mistakenly wrote the HTTPS protocol for the homepage address. Suddenly, WordPress starts redirecting itself to HTTPS, and since you don’t have a certificate, your original content displays an error. The problem arises, the website doesn’t work, and many people start to panic. However, the solution is straightforward, even if you can’t access the administration. MySQL and the phpMyAdmin tool can help you.

How To Fix A Wrong URL Of The Homepage In WordPress

You can also encounter the same situation when migrating WordPress to a different domain. Your CMS retains the original URL of the old domain and continues redirecting you there. It’s the same problem as mentioned above with HTTPS.

Fixing with MySQL

Fixing such an issue is not complicated at all, and all you need is access to the MySQL management. If you don’t have access to MySQL management, request the login details from your web hosting provider for the phpMyAdmin tool.

PhpMyAdmin is a tool that allows you to view all the tables and data in your database and make any necessary modifications. WordPress stores this setting in the xx_options table. The two x’s in the table name are prefixes that may vary based on the installation. If you left the installation to WordPress defaults, your table will be named wp_options.

And it is in this table where the key to the fix lies. There are two rows named home and siteurl. Yes, they are precisely the two rows from the settings shown in the image above. And this is where your website’s address is stored. You manually overwrite this address and save it.

Once you make this change in the xx_options table, WordPress will save the new URL, and the problem will be resolved. The change will take effect immediately on your website.

Since it’s better to demonstrate an example with an image rather than text, take a look below to see how easy it is to change the URL address.

How To Fix A Wrong URL Of The Homepage In WordPress

Conclusion

Once you modify the website’s URL address, especially the homeurl, you will restore the correct domain, protocol, and URL address to your WordPress. This allows you to elegantly and quickly resolve the issue of website redirection to an unintended address. You will encounter this situation primarily during WordPress migrations or when individuals are quicker to adopt HTTPS than their website provider is in issuing a certificate.

The website is created with care for the included information. I strive to provide high-quality and useful content that helps or inspires others. If you are satisfied with my work and would like to support me, you can do so through simple options.

Byl pro Vás tento článek užitečný?

Klikni na počet hvězd pro hlasování.

Průměrné hodnocení. 0 / 5. Počet hlasování: 0

Zatím nehodnoceno! Buďte první

Jak užitečný vidíte tento článek.

Sledujte mě na sociálních médiích.

Je mi líto, že pro Vás nebyl článek užitečný.

Jak mohu vylepšit článek?

Řekněte mi, jak jej mohu zlepšit.

newsletter

Subscribe to the Newsletter

Stay informed! Join our newsletter subscription and be the first to receive the latest information directly to your email inbox. Follow updates, exclusive events, and inspiring content, all delivered straight to your email.

Odebírat
Upozornit na
guest
0 Komentáře/ů
Nejstarší
Nejnovější Nejvíce hlasováno
Vložené zpětné vazby.
Zobrazit všechny komentáře.

Pokud mi chcete napsat rychlou zprávu, využije, prosím, níže uvedený
kontaktní formulář. Děkuji.

Další Kontaktní údaje