0

I have spent the last 3 and a half hours trying to find someone with the same problem as me.

What is going on is that my website example.com is not loading properly. When I opened up the inspector I noticed that I had a bunch of 404 errors. Suddenly WordPress has changed all the links in my site to be http://example.com/example.com instead of http://example.com. I have not made any changes to the website, it just seemed to have broken overnight.

I first noticed this problem when I attempt to log in, I got redirected to http://example.com/example.com/wp-login.php. I could not login because of this problem. What I added the following lines to my wp-config.php file:

define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');

This fixed the problem when I try to login but it does not fix the 30 or so odd errors that I am getting when I look in my inspector window. Nothing in the backend of my site is working because it is trying to go to the http://example.com/example.com.

I don't know what else to do besides add in, those lines to the wp-config.php

1 Answer 1

4

Check your .htaccess file for the proper values. Here's what WP recommends; you may need to adjust for your configuration (from here; more examples that might help) https://codex.wordpress.org/htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Also, check the values on the Settings, General page that the domain name is correct.

Then check the Settings, Permalink page to go back to one of the standard values (not the custom value).

You can also check the wp_options table for the correct domain name (in two places). That requires cPanel/myPHPAdmin access, though.

Back up files before you change anything.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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