Somehow the URLs of one of my clients WordPress-Websites got messed up and I can not figure out why.
WordPress is installed in a separate root/Wordpress/ folder.
\———-
*Files in root:*
/wordpress
.htaccess
index.php
wp-config.php
\———-
*In the admin-interface:*
WordPress Address (URL) = https.root.com/wordpress
Site Address (URL) = https.root.com/wordpress
\———-
*I by accident changed both to*
WordPress Address (URL) = https.root.com
Site Address (URL) = https.root.com
*(The goal was to remove the /wordpress/ from the URL and I am aware it was wrong to change both)*
\———-
That of course created some problems and I couldn’t access the wp-admin anymore. I managed to change it back, so that it now again is:
WordPress Address (URL) = https.root.com/wordpress
Site Address (URL) = https.root.com/wordpress
\———-
The first problem now is that I can open the website under “https.root.com/wordpress”, but when I try to open “https.root.com” it shows an error 500.
For reference, here is the content of the files in root:
content of .htaccess in root
# BEGIN WordPress
# The directives (lines) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<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
\-
content of index.php in root
<?php
/**
* Front to the WordPress application. This file doesn’t do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define( ‘WP_USE_THEMES’, true );
/** Loads the WordPress Environment and Template */
require __DIR__ . ‘wordpress/wp-blog-header.php’;
Final goal would be to set it up so that the “/wordpress/”-part of the URL would not be there anymore. But I guess I first need to fix it back to any working state before I can tackle this.
If someone has any idea I would be super thankful.
Cheers
[ad_2]
What do the error logs say