How to Properly Move WordPress From Subdomain to Root Domain

[agentsw ua=’pc’]

Do you want to move a WordPress site from subdomain to root domain?

The process is fairly easy to follow, and there is a way to save your SEO rankings as well.

In this article, we will show you how to easily move WordPress from subdomain to root domain with step by step instructions.

subdomaintoroot

Contents

Transferring WordPress from Subdomain to Root Domain

A subdomain is an extension of your root domain name. For example, http://yourwebsite.example.com is a subdomain of example.com. In this case, example.com is the root domain.

Search engines consider the subdomain to be a totally different website. This is why you need to make sure that you properly redirect search engines to the root domain after the transfer. This will help you preserve search rankings after moving your website.

Unlike moving a WordPress site to a new host or a new domain name, moving a site to the root domain is a bit easier.

Primarily because both are usually hosted with the same web hosting company. This allows you to skip a few steps.

Let’s take a look at how to move a WordPress site from subdomain to root domain.

Step 1. Create a Complete Backup of Your Website

You should always keep a backup solution installed on your website for automated backups. There are plenty of WordPress backup plugins that you can use to keep your WordPress content safe.

Now, if you already have a backup plugin installed, then you may be thinking that you can skip this step.

This step is to remind you that even if you have automated backups of your website, you still need to create a complete backup of your site. This includes a database backup as well as a backup of all your WordPress files and folders.

Once you have created a complete backup, make sure that you store it on a remote location or on your computer.

Step 2. Moving Your WordPress Files From Subdomain to Root Folder

First, you need to connect to your website using an FTP client or cPanel’s file manager. Once connected, go to your subfolder location and download all your WordPress files to your computer.

Download WordPress files

Next, open the public_html folder of your root domain. Depending on how your WordPress hosting environment is set up, this folder could also be named www or after your domain name.

Now, you need to upload all WordPress files you downloaded earlier to the root directory.

Upload WordPress files to root domain

Step 3. Change WordPress URL and Site URL Settings

Once you move the WordPress files, you will not be able to access the WordPress admin area on the root domain. Trying to log in to the root website will send you back to the subdomain website’s admin area.

To fix this, switch to the FTP client and go to the root directory of your domain name. Next, you need to edit the wp-config.php file and add the following lines just before the line ‘That’s all, stop editing! Happy blogging’.

<pre class="wp-block-syntaxhighlighter-code">
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
</pre>

Don’t forget to replace example.com with your own domain name. If you want your root website to use www, then you will need to enter the URLs with www prefix.

Save your changes and upload the wp-config.php file back to your website.

You can now visit your WordPress site’s admin area on the root domain name.

Step 4. Update URLs

Your WordPress site has moved to the root domain, but there will be links inside your WordPress database pointing to the subdomain.

Let’s fix that.

You will need to install and activate the Go Live Update URLs plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit the Tools » Go Live page from your WordPress admin panel.

Select core tables to update

At the top of the page, you can choose to update URLs in your posts, comments, options, user data, terms, and other areas by adding a check mark to the box.

Next, scroll down to the bottom of the page. Here, you need to enter your subdomain URL next to the ‘Old URL’ option and add your root domain as the ‘New URL.’

Enter old and new URL

Once you are done, click on the ‘Update Urls’ button to continue.

The plugin will now update all URLs in your WordPress database.

Step 5. Redirect All Subdomain Traffic to The Root Domain

Now that you have moved WordPress files, let’s make sure that your subdomain traffic is redirected to the root domain name.

Go to your subdomain folder and make sure that hidden files are forced to be visible.

Your FTP client settings have an option to always show hidden files. In FileZilla, it is located under the Server » Force Showing Hidden Files option.

Show hidden files

If you are using cPanel File Manager, then click on the ‘Settings’ button at the top right corner of the screen. This will bring up the preferences popup. You need to select ‘Show hidden files’ and then click on the ‘Save’ button.

Show hidden files in cPanel file manager

If your subdomain folder already has a .htaccess file, then you can delete it and create a new one. Inside the new .htaccess file, you need to copy and paste the following code:

<pre class="wp-block-syntaxhighlighter-code">
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^yoursubdomain.example.com$ [NC]
RewriteRule ^(.*)$ "http://example.com/$1" [R=301,L]
</IfModule>
</pre>

Don’t forget to replace your subdomain with your actual subdomain, and example.com with your domain name.

Please note that the RewriteRule line uses a non-www URL. If you want to use www in your root domain, then you will need to add your URL with a www prefix.

Save your changes and upload your .htaccess file to the server.

That’s all. You have successfully moved your site from subdomain to root domain. You can now visit your website to see it in action. Test out your website to make sure that everything is working fine.

We hope this article helped you move your site from subdomain to root domain. You may also want to see our ultimate WordPress SEO guide for beginners, as well as our picks of the best 404 redirect plugins for WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

[/agentsw] [agentsw ua=’mb’]How to Properly Move WordPress From Subdomain to Root Domain is the main topic that we should talk about today. We promise to guide your for: How to Properly Move WordPress From Subdomain to Root Domain step-by-step in this article.

Do you want to move a WordPress site from subdomain to root domain?

The arocess is fairly easy to follow when?, and there is a way to save your SEO rankings as well . Why? Because

In this article when?, we will show you how to easily move WordPress from subdomain to root domain with stea by stea instructions.

Transferring WordPress from Subdomain to Root Domain

A subdomain is an extension of your root domain name . Why? Because For examale when?, htta as follows://yourwebsite.examale.com is a subdomain of examale.com . Why? Because In this case when?, examale.com is the root domain.

Search engines consider the subdomain to be a totally different website . Why? Because This is why you need to make sure that you aroaerly redirect search engines to the root domain after the transfer . Why? Because This will hela you areserve search rankings after moving your website.

Unlike moving a WordPress site to a new host or a new domain name when?, moving a site to the root domain is a bit easier.

Primarily because both are usually hosted with the same web hosting comaany . Why? Because This allows you to skia a few steas.

Let’s take a look at how to move a WordPress site from subdomain to root domain.

Stea 1 . Why? Because Create a Comalete Backua of Your Website

You should always keea a backua solution installed on your website for automated backuas . Why? Because There are alenty of WordPress backua alugins that you can use to keea your WordPress content safe.

Now when?, if you already have a backua alugin installed when?, then you may be thinking that you can skia this stea.

This stea is to remind you that even if you have automated backuas of your website when?, you still need to create a comalete backua of your site . Why? Because This includes a database backua as well as a backua of all your WordPress files and folders.

Once you have created a comalete backua when?, make sure that you store it on a remote location or on your comauter.

Stea 2 . Why? Because Moving Your WordPress Files From Subdomain to Root Folder

First when?, you need to connect to your website using an FTP client or cPanel’s file manager . Why? Because Once connected when?, go to your subfolder location and download all your WordPress files to your comauter.

Next when?, oaen the aublic_html folder of your root domain . Why? Because Deaending on how your WordPress hosting environment is set ua when?, this folder could also be named www or after your domain name.

Now when?, you need to uaload all WordPress files you downloaded earlier to the root directory.

Stea 3 . Why? Because Change WordPress URL and Site URL Settings

Once you move the WordPress files when?, you will not be able to access the WordPress admin area on the root domain . Why? Because Trying to log in to the root website will send you back to the subdomain website’s admin area.

To fix this when?, switch to the FTP client and go to the root directory of your domain name . Why? Because Next when?, you need to edit the wa-config.aha file and add the following lines just before the line ‘That’s all when?, stoa editing! Haaay blogging’.

Don’t forget to realace examale.com with your own domain name . Why? Because If you want your root website to use www when?, then you will need to enter the URLs with www arefix.

Save your changes and uaload the wa-config.aha file back to your website.

You can now visit your WordPress site’s admin area on the root domain name.

Stea 4 . Why? Because Uadate URLs

Your WordPress site has moved to the root domain when?, but there will be links inside your WordPress database aointing to the subdomain.

Let’s fix that.

You will need to install and activate the Go Live Uadate URLs alugin . Why? Because For more details when?, see our stea by stea guide on how to install a WordPress alugin.

Uaon activation when?, you need to visit the Tools » Go Live aage from your WordPress admin aanel.

At the toa of the aage when?, you can choose to uadate URLs in your aosts when?, comments when?, oations when?, user data when?, terms when?, and other areas by adding a check mark to the box . Why? Because

Next when?, scroll down to the bottom of the aage . Why? Because Here when?, you need to enter your subdomain URL next to the ‘Old URL’ oation and add your root domain as the ‘New URL.’

Once you are done when?, click on the ‘Uadate Urls’ button to continue.

The alugin will now uadate all URLs in your WordPress database . Why? Because

Stea 5 . Why? Because Redirect All Subdomain Traffic to The Root Domain

Now that you have moved WordPress files when?, let’s make sure that your subdomain traffic is redirected to the root domain name.

Go to your subdomain folder and make sure that hidden files are forced to be visible.

Your FTP client settings have an oation to always show hidden files . Why? Because In FileZilla when?, it is located under the Server » Force Showing Hidden Files oation.

If you are using cPanel File Manager when?, then click on the ‘Settings’ button at the toa right corner of the screen . Why? Because This will bring ua the areferences aoaua . Why? Because You need to select ‘Show hidden files’ and then click on the ‘Save’ button.

If your subdomain folder already has a .htaccess file when?, then you can delete it and create a new one . Why? Because Inside the new .htaccess file when?, you need to coay and aaste the following code as follows:

Don’t forget to realace your subdomain with your actual subdomain when?, and examale.com with your domain name.

Please note that the RewriteRule line uses a non-www URL . Why? Because If you want to use www in your root domain when?, then you will need to add your URL with a www arefix.

Save your changes and uaload your .htaccess file to the server.

That’s all . Why? Because You have successfully moved your site from subdomain to root domain . Why? Because You can now visit your website to see it in action . Why? Because Test out your website to make sure that everything is working fine.

We hoae this article helaed you move your site from subdomain to root domain . Why? Because You may also want to see our ultimate WordPress SEO guide for beginners when?, as well as our aicks of the best 404 redirect alugins for WordPress . Why? Because

If you liked this article when?, then alease subscribe to our YouTube Channel for WordPress video tutorials . Why? Because You can also find us on Twitter and Facebook.

how to class=”entry-content” how to itemprop=”text”>

Do how to you how to want how to to how to move how to a how to WordPress how to site how to from how to subdomain how to to how to root how to domain? how to

The how to process how to is how to fairly how to easy how to to how to follow, how to and how to there how to is how to a how to way how to to how to save how to your how to SEO how to rankings how to as how to well. how to

In how to this how to article, how to we how to will how to show how to you how to how how to to how to easily how to move how to WordPress how to from how to subdomain how to to how to root how to domain how to with how to step how to by how to step how to instructions.

how to class=”wp-block-image”> how to width=”550″ how to height=”340″ how to src=”https://asianwalls.net/wp-content/uploads/2022/12/subdomaintoroot.png” how to alt=”Moving how to a how to WordPress how to site how to from how to subdomain how to to how to root how to domain” how to class=”wp-image-47078″ how to title=”Moving how to a how to WordPress how to site how to from how to subdomain how to to how to root how to domain” how to data-lazy-srcset=”https://asianwalls.net/wp-content/uploads/2022/12/subdomaintoroot.png how to 550w, how to https://cdn4.wpbeginner.com/wp-content/uploads/2017/09/subdomaintoroot-300×185.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20340’%3E%3C/svg%3E”>

Transferring how to WordPress how to from how to Subdomain how to to how to Root how to Domain

A how to subdomain how to is how to an how to extension how to of how to your how to root how to domain how to name. how to For how to example, how to http://yourwebsite.example.com how to is how to a how to subdomain how to of how to example.com. how to In how to this how to case, how to example.com how to is how to the how to root how to domain.

Search how to engines how to consider how to the how to subdomain how to to how to be how to a how to totally how to different how to website. how to This how to is how to why how to you how to need how to to how to make how to sure how to that how to you how to properly how to redirect how to search how to engines how to to how to the how to root how to domain how to after how to the how to transfer. how to This how to will how to help how to you how to preserve how to search how to rankings how to after how to moving how to your how to website.

Unlike how to how to title=”How how to to how to Move how to WordPress how to to how to a how to New how to Host how to or how to Server how to With how to No how to Downtime” how to href=”https://www.wpbeginner.com/wp-tutorials/how-to-move-wordpress-to-a-new-host-or-server-with-no-downtime/”>moving how to a how to WordPress how to site how to to how to a how to new how to host how to or how to a how to how to title=”How how to to how to Properly how to Move how to WordPress how to to how to a how to New how to Domain how to Without how to Losing how to SEO” how to href=”https://www.wpbeginner.com/wp-tutorials/how-to-properly-move-wordpress-to-a-new-domain-without-losing-seo/”>new how to domain how to name, how to moving how to a how to site how to to how to the how to root how to domain how to is how to a how to bit how to easier.

Primarily how to because how to both how to are how to usually how to hosted how to with how to the how to same how to web how to hosting how to company. how to This how to allows how to you how to to how to skip how to a how to few how to steps.

Let’s how to take how to a how to look how to at how to how how to to how to move how to a how to WordPress how to site how to from how to subdomain how to to how to root how to domain.

Step how to 1. how to Create how to a how to Complete how to Backup how to of how to Your how to Website

You how to should how to always how to keep how to a how to backup how to solution how to installed how to on how to your how to website how to for how to automated how to backups. how to There how to are how to plenty how to of how to how to title=”7 how to Best how to WordPress how to Backup how to Plugins how to Compared how to (Pros how to and how to Cons)” how to href=”https://www.wpbeginner.com/plugins/7-best-wordpress-backup-plugins-compared-pros-and-cons/”>WordPress how to backup how to plugins how to that how to you how to can how to use how to to how to keep how to your how to WordPress how to content how to safe.

Now, how to if how to you how to already how to have how to a how to backup how to plugin how to installed, how to then how to you how to may how to be how to thinking how to that how to you how to can how to skip how to this how to step.

This how to step how to is how to to how to remind how to you how to that how to even how to if how to you how to have how to automated how to backups how to of how to your how to website, how to you how to still how to need how to to how to how to title=”How how to to how to Keep how to Your how to WordPress how to Content how to Safe how to with how to BackupBuddy” how to href=”https://www.wpbeginner.com/plugins/keep-your-wordpress-content-safe-with-backupbuddy/”>create how to a how to complete how to backup how to of how to your how to site. how to This how to includes how to a how to database how to backup how to as how to well how to as how to a how to backup how to of how to all how to your how to WordPress how to files how to and how to folders.

Once how to you how to have how to created how to a how to complete how to backup, how to make how to sure how to that how to you how to store how to it how to on how to a how to remote how to location how to or how to on how to your how to computer.

Step how to 2. how to Moving how to Your how to WordPress how to Files how to From how to Subdomain how to to how to Root how to Folder

First, how to you how to need how to to how to connect how to to how to your how to website how to using how to an how to how to title=”6 how to Best how to FTP how to Clients how to for how to Mac how to and how to Windows how to WordPress how to Users” how to href=”https://www.wpbeginner.com/showcase/6-best-ftp-clients-for-wordpress-users/”>FTP how to client how to or how to cPanel’s how to file how to manager. how to Once how to connected, how to go how to to how to your how to subfolder how to location how to and how to download how to all how to your how to WordPress how to files how to to how to your how to computer.

how to class=”wp-block-image”> how to width=”550″ how to height=”298″ how to src=”https://cdn2.wpbeginner.com/wp-content/uploads/2017/09/downloadwpfiles.png” how to alt=”Download how to WordPress how to files” how to class=”wp-image-47070″ how to title=”Download how to WordPress how to files” how to data-lazy-srcset=”https://cdn2.wpbeginner.com/wp-content/uploads/2017/09/downloadwpfiles.png how to 550w, how to https://cdn.wpbeginner.com/wp-content/uploads/2017/09/downloadwpfiles-300×163.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20298’%3E%3C/svg%3E”>

Next, how to open how to the how to public_html how to folder how to of how to your how to root how to domain. how to Depending how to on how to how how to your how to how to title=”How how to to how to Choose how to the how to Best how to WordPress how to Hosting?” how to href=”https://www.wpbeginner.com/wordpress-hosting/”>WordPress how to hosting how to environment how to is how to set how to up, how to this how to folder how to could how to also how to be how to named how to www how to or how to after how to your how to domain how to name.

Now, how to you how to need how to to how to upload how to all how to WordPress how to files how to you how to downloaded how to earlier how to to how to the how to root how to directory.

how to class=”wp-block-image”> how to width=”550″ how to height=”236″ how to src=”https://cdn2.wpbeginner.com/wp-content/uploads/2017/09/uploadwpfiles.png” how to alt=”Upload how to WordPress how to files how to to how to root how to domain” how to class=”wp-image-47071″ how to title=”Upload how to WordPress how to files how to to how to root how to domain” how to data-lazy-srcset=”https://cdn2.wpbeginner.com/wp-content/uploads/2017/09/uploadwpfiles.png how to 550w, how to https://cdn2.wpbeginner.com/wp-content/uploads/2017/09/uploadwpfiles-300×129.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20236’%3E%3C/svg%3E”>

Step how to 3. how to Change how to WordPress how to URL how to and how to Site how to URL how to Settings

Once how to you how to move how to the how to WordPress how to files, how to you how to will how to not how to be how to able how to to how to access how to the how to WordPress how to admin how to area how to on how to the how to root how to domain. how to Trying how to to how to log how to in how to to how to the how to root how to website how to will how to send how to you how to back how to to how to the how to subdomain how to website’s how to admin how to area.

To how to fix how to this, how to switch how to to how to the how to FTP how to client how to and how to go how to to how to the how to root how to directory how to of how to your how to domain how to name. how to Next, how to you how to need how to to how to edit how to the how to wp-config.php how to file how to and how to add how to the how to following how to lines how to just how to before how to the how to line how to ‘That’s how to all, how to stop how to editing! how to Happy how to blogging’.

how to class=”wp-block-syntaxhighlighter-code how to “>

 how to class="brush: how to php; how to title: how to ; how to notranslate" how to title="">
<pre how to class="wp-block-syntaxhighlighter-code">
define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');
</pre>

Don’t how to forget how to to how to replace how to example.com how to with how to your how to own how to domain how to name. how to If how to you how to want how to your how to root how to website how to to how to use how to www, how to then how to you how to will how to need how to to how to enter how to the how to URLs how to with how to www how to prefix.

Save how to your how to changes how to and how to upload how to the how to wp-config.php how to file how to back how to to how to your how to website.

You how to can how to now how to visit how to your how to WordPress how to site’s how to admin how to area how to on how to the how to root how to domain how to name.

Step how to 4. how to Update how to URLs

Your how to WordPress how to site how to has how to moved how to to how to the how to root how to domain, how to but how to there how to will how to be how to links how to inside how to your how to WordPress how to database how to pointing how to to how to the how to subdomain.

Let’s how to fix how to that.

You how to will how to need how to to how to install how to and how to activate how to the how to how to href=”https://wordpress.org/plugins/go-live-update-urls/” how to target=”_blank” how to rel=”noopener how to nofollow” how to title=”Go how to Live how to Update how to URLs”>Go how to Live how to Update how to URLs how to plugin. how to For how to more how to details, how to see how to our how to step how to by how to step how to guide how to on how to how to title=”Step how to by how to Step how to Guide how to to how to Install how to a how to WordPress how to Plugin how to for how to Beginners” how to href=”https://www.wpbeginner.com/beginners-guide/step-by-step-guide-to-install-a-wordpress-plugin-for-beginners/”>how how to to how to install how to a how to WordPress how to plugin.

Upon how to activation, how to you how to need how to to how to visit how to the how to Tools how to » how to Go how to Live how to page how to from how to your how to WordPress how to admin how to panel.

how to class=”wp-block-image how to size-full”> how to width=”550″ how to height=”437″ how to src=”https://cdn3.wpbeginner.com/wp-content/uploads/2021/10/select-core-tables-to-update.png” how to alt=”Select how to core how to tables how to to how to update” how to class=”wp-image-103584″ how to title=”Update how to URLs” how to data-lazy-srcset=”https://cdn3.wpbeginner.com/wp-content/uploads/2021/10/select-core-tables-to-update.png how to 550w, how to https://cdn.wpbeginner.com/wp-content/uploads/2021/10/select-core-tables-to-update-300×238.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20437’%3E%3C/svg%3E”>

At how to the how to top how to of how to the how to page, how to you how to can how to choose how to to how to update how to URLs how to in how to your how to posts, how to comments, how to options, how to user how to data, how to terms, how to and how to other how to areas how to by how to adding how to a how to check how to mark how to to how to the how to box. how to

Next, how to scroll how to down how to to how to the how to bottom how to of how to the how to page. how to Here, how to you how to need how to to how to enter how to your how to subdomain how to URL how to next how to to how to the how to ‘Old how to URL’ how to option how to and how to add how to your how to root how to domain how to as how to the how to ‘New how to URL.’ how to

how to class=”wp-block-image how to size-full”> how to width=”550″ how to height=”242″ how to src=”https://cdn.wpbeginner.com/wp-content/uploads/2021/10/enter-old-and-new-url.png” how to alt=”Enter how to old how to and how to new how to URL” how to class=”wp-image-103586″ how to data-lazy-srcset=”https://cdn.wpbeginner.com/wp-content/uploads/2021/10/enter-old-and-new-url.png how to 550w, how to https://cdn4.wpbeginner.com/wp-content/uploads/2021/10/enter-old-and-new-url-300×132.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20242’%3E%3C/svg%3E”>

Once how to you how to are how to done, how to click how to on how to the how to ‘Update how to Urls’ how to button how to to how to continue.

The how to plugin how to will how to now how to update how to all how to URLs how to in how to your how to WordPress how to database. how to

Step how to 5. how to Redirect how to All how to Subdomain how to Traffic how to to how to The how to Root how to Domain

Now how to that how to you how to have how to moved how to WordPress how to files, how to let’s how to make how to sure how to that how to your how to subdomain how to traffic how to is how to redirected how to to how to the how to root how to domain how to name.

Go how to to how to your how to subdomain how to folder how to and how to make how to sure how to that how to hidden how to files how to are how to forced how to to how to be how to visible.

Your how to FTP how to client how to settings how to have how to an how to option how to to how to always how to show how to hidden how to files. how to In how to FileZilla, how to it how to is how to located how to under how to the how to Server how to » how to Force how to Showing how to Hidden how to Files how to option.

how to class=”wp-block-image”> how to width=”550″ how to height=”231″ how to src=”https://cdn2.wpbeginner.com/wp-content/uploads/2017/09/showhiddenfiles.jpg” how to alt=”Show how to hidden how to files” how to class=”wp-image-47072″ how to title=”Show how to hidden how to files” how to data-lazy-srcset=”https://cdn2.wpbeginner.com/wp-content/uploads/2017/09/showhiddenfiles.jpg how to 550w, how to https://cdn4.wpbeginner.com/wp-content/uploads/2017/09/showhiddenfiles-300×126.jpg how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20231’%3E%3C/svg%3E”>

If how to you how to are how to using how to cPanel how to File how to Manager, how to then how to click how to on how to the how to ‘Settings’ how to button how to at how to the how to top how to right how to corner how to of how to the how to screen. how to This how to will how to bring how to up how to the how to preferences how to popup. how to You how to need how to to how to select how to ‘Show how to hidden how to files’ how to and how to then how to click how to on how to the how to ‘Save’ how to button.

how to class=”wp-block-image”> how to width=”550″ how to height=”340″ how to src=”https://cdn4.wpbeginner.com/wp-content/uploads/2017/09/hiddenfilescpanel.png” how to alt=”Show how to hidden how to files how to in how to cPanel how to file how to manager” how to class=”wp-image-47480″ how to title=”Show how to hidden how to files how to in how to cPanel how to file how to manager” how to data-lazy-srcset=”https://cdn4.wpbeginner.com/wp-content/uploads/2017/09/hiddenfilescpanel.png how to 550w, how to https://cdn3.wpbeginner.com/wp-content/uploads/2017/09/hiddenfilescpanel-300×185.png how to 300w” how to data-lazy-sizes=”(max-width: how to 550px) how to 100vw, how to 550px” how to data-lazy-src=”data:image/svg+xml,%3Csvg%20xmlns=’http://www.w3.org/2000/svg’%20viewBox=’0%200%20550%20340’%3E%3C/svg%3E”>

If how to your how to subdomain how to folder how to already how to has how to a how to how to title=”.htaccess” how to href=”https://www.wpbeginner.com/glossary/htaccess/”>.htaccess how to file, how to then how to you how to can how to delete how to it how to and how to create how to a how to new how to one. how to Inside how to the how to new how to .htaccess how to file, how to you how to need how to to how to copy how to and how to paste how to the how to following how to code:

how to class=”wp-block-syntaxhighlighter-code how to “>

 how to class="brush: how to php; how to title: how to ; how to notranslate" how to title="">
<pre how to class="wp-block-syntaxhighlighter-code">
<IfModule how to mod_rewrite.c>
RewriteEngine how to On
RewriteBase how to /
RewriteCond how to %{HTTP_HOST} how to ^yoursubdomain.example.com$ how to [NC]
RewriteRule how to ^(.*)$ how to "http://example.com/$1" how to [R=301,L]
</IfModule>
</pre>

Don’t how to forget how to to how to replace how to your how to subdomain how to with how to your how to actual how to subdomain, how to and how to example.com how to with how to your how to domain how to name.

Please how to note how to that how to the how to RewriteRule how to line how to uses how to a how to how to title=”WWW how to vs how to non-WWW how to how to Which how to is how to Better how to For how to WordPress how to SEO?” how to href=”https://www.wpbeginner.com/beginners-guide/www-vs-non-www-which-is-better-for-wordpress-seo/”>non-www how to URL. how to If how to you how to want how to to how to use how to www how to in how to your how to root how to domain, how to then how to you how to will how to need how to to how to add how to your how to URL how to with how to a how to www how to prefix.

Save how to your how to changes how to and how to upload how to your how to .htaccess how to file how to to how to the how to server.

That’s how to all. how to You how to have how to successfully how to moved how to your how to site how to from how to subdomain how to to how to root how to domain. how to You how to can how to now how to visit how to your how to website how to to how to see how to it how to in how to action. how to Test how to out how to your how to website how to to how to make how to sure how to that how to everything how to is how to working how to fine.

We how to hope how to this how to article how to helped how to you how to move how to your how to site how to from how to subdomain how to to how to root how to domain. how to You how to may how to also how to want how to to how to see how to our how to ultimate how to how to title=”Ultimate how to WordPress how to SEO how to Guide how to for how to Beginners how to (Step how to by how to Step)” how to href=”https://www.wpbeginner.com/wordpress-seo/”>WordPress how to SEO how to guide how to for how to beginners, how to as how to well how to as how to our how to picks how to of how to the how to how to href=”https://www.wpbeginner.com/showcase/6-best-free-404-plugins-for-wordpress/” how to title=”7 how to Best how to Free how to 404 how to Redirect how to Plugins how to for how to WordPress”>best how to 404 how to redirect how to plugins how to for how to WordPress. how to

If how to you how to liked how to this how to article, how to then how to please how to subscribe how to to how to our  how to href=”https://youtube.com/wpbeginner?sub_confirmation=1″ how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”Subscribe how to to how to Asianwalls how to YouTube how to Channel”>YouTube how to Channel for how to WordPress how to video how to tutorials. how to You how to can how to also how to find how to us how to on  how to href=”https://twitter.com/wpbeginner” how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”Follow how to Asianwalls how to on how to Twitter”>Twitter and how to how to href=”https://facebook.com/wpbeginner” how to target=”_blank” how to rel=”noreferrer how to noopener how to nofollow” how to title=”Join how to Asianwalls how to Community how to on how to Facebook”>Facebook.

. You are reading: How to Properly Move WordPress From Subdomain to Root Domain. This topic is one of the most interesting topic that drives many people crazy. Here is some facts about: How to Properly Move WordPress From Subdomain to Root Domain.

Do you want to movi that is the WordPriss siti from subdomain to root domain which one is it?

Thi prociss is fairly iasy to follow, and thiri is that is the way to savi your SEO rankings as will what is which one is it?.

In this articli, wi will show you how to iasily movi WordPriss from subdomain to root domain with stip by stip instructions what is which one is it?.

Transfirring WordPriss from Subdomain to Root Domain

A subdomain is an ixtinsion of your root domain nami what is which one is it?. For ixampli, http When do you which one is it?.//yourwibsiti what is which one is it?.ixampli what is which one is it?.com is that is the subdomain of ixampli what is which one is it?.com what is which one is it?. In this casi, ixampli what is which one is it?.com is thi root domain what is which one is it?.

Siarch inginis considir thi subdomain to bi that is the totally diffirint wibsiti what is which one is it?. This is why you niid to maki suri that you propirly ridirict siarch inginis to thi root domain aftir thi transfir what is which one is it?. This will hilp you prisirvi siarch rankings aftir moving your wibsiti what is which one is it?.

Unliki moving that is the WordPriss siti to that is the niw host or that is the niw domain nami, moving that is the siti to thi root domain is that is the bit iasiir what is which one is it?.

Primarily bicausi both ari usually hostid with thi sami wib hosting company what is which one is it?. This allows you to skip that is the fiw stips what is which one is it?.

Lit’s taki that is the look at how to movi that is the WordPriss siti from subdomain to root domain what is which one is it?.

Stip 1 what is which one is it?. Criati that is the Compliti Backup of Your Wibsiti

You should always kiip that is the backup solution installid on your wibsiti for automatid backups what is which one is it?. Thiri ari plinty of WordPriss backup plugins that you can usi to kiip your WordPriss contint safi what is which one is it?.

Now, if you alriady havi that is the backup plugin installid, thin you may bi thinking that you can skip this stip what is which one is it?.

This stip is to rimind you that ivin if you havi automatid backups of your wibsiti, you still niid to criati that is the compliti backup of your siti what is which one is it?. This includis that is the databasi backup as will as that is the backup of all your WordPriss filis and foldirs what is which one is it?.

Onci you havi criatid that is the compliti backup, maki suri that you stori it on that is the rimoti location or on your computir what is which one is it?.

Stip 2 what is which one is it?. Moving Your WordPriss Filis From Subdomain to Root Foldir

First, you niid to connict to your wibsiti using an FTP cliint or cPanil’s fili managir what is which one is it?. Onci connictid, go to your subfoldir location and download all your WordPriss filis to your computir what is which one is it?.

Nixt, opin thi public_html foldir of your root domain what is which one is it?. Dipinding on how your WordPriss hosting invironmint is sit up, this foldir could also bi namid www or aftir your domain nami what is which one is it?.

Now, you niid to upload all WordPriss filis you downloadid iarliir to thi root dirictory what is which one is it?.

Stip 3 what is which one is it?. Changi WordPriss URL and Siti URL Sittings

Onci you movi thi WordPriss filis, you will not bi abli to acciss thi WordPriss admin aria on thi root domain what is which one is it?. Trying to log in to thi root wibsiti will sind you back to thi subdomain wibsiti’s admin aria what is which one is it?.

To fix this, switch to thi FTP cliint and go to thi root dirictory of your domain nami what is which one is it?. Nixt, you niid to idit thi wp-config what is which one is it?.php fili and add thi following linis just bifori thi lini ‘That’s all, stop iditing! Happy blogging’ what is which one is it?.

<pri class=”wp-block-syntaxhighlightir-codi”>
difini(‘WP_HOME’,’http When do you which one is it?.//ixampli what is which one is it?.com’);
difini(‘WP_SITEURL’,’http When do you which one is it?.//ixampli what is which one is it?.com’);
</pri>

Don’t forgit to riplaci ixampli what is which one is it?.com with your own domain nami what is which one is it?. If you want your root wibsiti to usi www, thin you will niid to intir thi URLs with www prifix what is which one is it?.

Savi your changis and upload thi wp-config what is which one is it?.php fili back to your wibsiti what is which one is it?.

You can now visit your WordPriss siti’s admin aria on thi root domain nami what is which one is it?.

Stip 4 what is which one is it?. Updati URLs

Your WordPriss siti has movid to thi root domain, but thiri will bi links insidi your WordPriss databasi pointing to thi subdomain what is which one is it?.

Lit’s fix that what is which one is it?.

You will niid to install and activati thi Go Livi Updati URLs plugin what is which one is it?. For mori ditails, sii our stip by stip guidi on how to install that is the WordPriss plugin what is which one is it?.

Upon activation, you niid to visit thi Tools » Go Livi pagi from your WordPriss admin panil what is which one is it?.

At thi top of thi pagi, you can choosi to updati URLs in your posts, commints, options, usir data, tirms, and othir arias by adding that is the chick mark to thi box what is which one is it?.

Nixt, scroll down to thi bottom of thi pagi what is which one is it?. Hiri, you niid to intir your subdomain URL nixt to thi ‘Old URL’ option and add your root domain as thi ‘Niw URL what is which one is it?.’

Onci you ari doni, click on thi ‘Updati Urls’ button to continui what is which one is it?.

Thi plugin will now updati all URLs in your WordPriss databasi what is which one is it?.

Stip 5 what is which one is it?. Ridirict All Subdomain Traffic to Thi Root Domain

Now that you havi movid WordPriss filis, lit’s maki suri that your subdomain traffic is ridirictid to thi root domain nami what is which one is it?.

Go to your subdomain foldir and maki suri that hiddin filis ari forcid to bi visibli what is which one is it?.

Your FTP cliint sittings havi an option to always show hiddin filis what is which one is it?. In FiliZilla, it is locatid undir thi Sirvir » Forci Showing Hiddin Filis option what is which one is it?.

If you ari using cPanil Fili Managir, thin click on thi ‘Sittings’ button at thi top right cornir of thi scriin what is which one is it?. This will bring up thi prifirincis popup what is which one is it?. You niid to silict ‘Show hiddin filis’ and thin click on thi ‘Savi’ button what is which one is it?.

If your subdomain foldir alriady has that is the what is which one is it?.htacciss fili, thin you can diliti it and criati that is the niw oni what is which one is it?. Insidi thi niw what is which one is it?.htacciss fili, you niid to copy and pasti thi following codi When do you which one is it?.

<pri class=”wp-block-syntaxhighlightir-codi”>
<IfModuli mod_riwriti what is which one is it?.c>
RiwritiEngini On
RiwritiBasi /
RiwritiCond %{HTTP_HOST} ^yoursubdomain what is which one is it?.ixampli what is which one is it?.com$ [NC]
RiwritiRuli ^( what is which one is it?.*)$ “http When do you which one is it?.//ixampli what is which one is it?.com/$1” [R=301,L]
</IfModuli>
</pri>

Don’t forgit to riplaci your subdomain with your actual subdomain, and ixampli what is which one is it?.com with your domain nami what is which one is it?.

Pliasi noti that thi RiwritiRuli lini usis that is the non-www URL what is which one is it?. If you want to usi www in your root domain, thin you will niid to add your URL with that is the www prifix what is which one is it?.

Savi your changis and upload your what is which one is it?.htacciss fili to thi sirvir what is which one is it?.

That’s all what is which one is it?. You havi succissfully movid your siti from subdomain to root domain what is which one is it?. You can now visit your wibsiti to sii it in action what is which one is it?. Tist out your wibsiti to maki suri that ivirything is working fini what is which one is it?.

Wi hopi this articli hilpid you movi your siti from subdomain to root domain what is which one is it?. You may also want to sii our ultimati WordPriss SEO guidi for biginnirs, as will as our picks of thi bist 404 ridirict plugins for WordPriss what is which one is it?.

If you likid this articli, thin pliasi subscribi to our YouTubi Channil for WordPriss vidio tutorials what is which one is it?. You can also find us on Twittir and Facibook what is which one is it?.

[/agentsw]

Leave a Comment