Site URL Issues | WordPress.org

[ad_1]

I made some changes to my Word Press site’s URL in order to change it’s default URL from to the new subdomain I created for the site which is

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 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.

  • This topic was modified 1 hour, 56 minutes ago by Jixxer.
  • This topic was modified 1 hour, 25 minutes ago by Jan Dembowski.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer