Looking forward for how WordPress move subdomain to main domain? We can help you do it.
Unfortunately, sometime after installing the WordPress, the website has been installed to the subdomain /wp.
However, we can fix this easily without completely moving content.
At Bobcares, we often get requests from our customers to move subdomain to main domain as part of our Server Management Services.
Today, let’s get into the details on how our Support Engineers fix this problem.
Why main website not showing WordPress contents?
We are not able to access the WordPress site upon loading URL : http://<domain name>. However, this happens because the WordPress contents has been installed under the wp directory.
In such case we usually copy all the contents from wp directory to public_html. Here all the references of wp directory had removed from the database. In some cases, we can’t remove all the references from the database without the assistance of developers.
However, we don’t actually need to copy all the contents from wp directory to public_html for this purpose.
Let’s see how our Support Engineers help in easily moving WordPress subdomain to main domain.
How easily WordPress move subdomain to main domain ?
At Bobcares, where we have more than a decade of expertise in managing servers, we see many customers face this problem after WordPress install.
Now, let’s see how our Support Engineers fix this problem.
Frequently, many customers face problem with WordPress site upon loading URL : http://<domain name>, and they approach us for transferring the website contents to main website.
However, we don’t actually need to copy all the contents from wp directory to public_html for this purpose. We follow the below steps to achieve the same goal.
1. Initially, we copy the index.php file from wp directory to public_html.
2. We then Open the index.php file and edit the below line.
require( dirname( __FILE__ ) . ‘/wp-blog-header.php’ );
to
require( dirname( __FILE__ ) . ‘/wp/wp-blog-header.php’ );
(Assuming that wp is the directory in which WordPress contents are located)
3. Thereafter, we logged into dashboard.
4. In the dashboard, we go to settings > General and change the Site address (home URL) to http://<domain name>.
Keep the WordPress Address (Site URL) as it is. That is it should be http://<domain name>/wp.
We also do it via going to phpMyAdmin and change the site URL and home URL. Here home URL should be http://<domain name> and site URL should be http://<domain name>/wp.
5. Then go to settings > Permalinks and just clicked Save. Thereafter, it automatically adds permalink code to .htaccess file in public_html directory.
For this, we can also create a .htaccess file in public_html and add below permalink code manually.
6. We then, go to Appearance > Menus and look for any custom Links. If there are any references of wp in the custom link, we removed that reference.
7. Now we load the main webste and it loads the WordPress site properly. We then checked every sub links to verify its working.
8. The admin page can also be accessed using the URL http://your domain/wp-admin, however it will then get redirected to http://your domain/wp/wp-admin.
[Want to migrate WordPress site? We’ll fix it for you.]
Conclusion
In short, the installation of WordPress can be in the /wp folder other than the main site. However, this can be easily rectified, and we can load the site under main domain. Today, we saw how our Support Engineers fixed this.
0 Comments