Site URL Issues
-
I made some changes to my Word Press site’s URL in order to change it’s default URL from https://mysite.com/blog to the new subdomain I created for the site which is https://blog.mysite.com
I first made some changes to the WordPress Address (URL) and Site Address (URL) under General settings on the site, which seemed to work initially, but eventually things stopped working correctly and I couldn’t get the site to load without getting 404 errors.
So eventually I added some code to the wp-config.php file, which then fixed the problem and the site started working again correctly after I added the code. The code I added is as follows:define( 'WP_HOME', 'https://blog.mysite.com' );
;
define( 'WP_SITEURL', 'https://blog.mysite.com' )
Or I can get the site URL to go back to the way it was originally by adding the following code instead:define( 'WP_HOME', 'https:/?mysite.com/blog' );
define( 'WP_SITEURL', 'https://mysite.com/blog' );
Then I also noticed some changes seem to have been made to the .htaccess file, which I don’t think I made. I think originally the .htaccess had the following:RewriteBase /blog/
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
And now it has the following instead:RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
The issue though is that if I remove that code I added to the wp-config.php file then the site doesn’t work correctly and it wont load properly. The site just comes up as text only with no graphics and there is no way I can get to the wp-admin login screen to get into the dashboard of the site. It just returns back 404 errors when I try to go to https://mysite.com/blog/wp-admin if I remove the website URLs I added to the wp-config file.
But I did create a full site backup before I made all these changes and originally the site was working correctly without any of the code changes I made to the wp-config.php file. So I am wondering if it would be possible to restore some of the files from the site backup on to the server and return everything back to the original way it was before?
Thank you.
- The topic ‘Site URL Issues’ is closed to new replies.