{"id":721,"date":"2024-10-19T15:54:03","date_gmt":"2024-10-19T15:54:03","guid":{"rendered":"https:\/\/webhostingdelhi.net.in\/tutorials\/?p=721"},"modified":"2024-10-19T15:54:17","modified_gmt":"2024-10-19T15:54:17","slug":"move-wordpress-from-subfolder-to-root-directory","status":"publish","type":"post","link":"https:\/\/webhostingdelhi.net.in\/tutorials\/move-wordpress-from-subfolder-to-root-directory\/","title":{"rendered":"How to Move WordPress from Subfolder to Root Directory"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Move <a href=\"https:\/\/wordpress.com\/\" rel=\"nofollow noopener\" target=\"_blank\">WordPress<\/a> from Subfolder to Root Directory is a common task when reorganizing your website structure for better accessibility and SEO. This process involves updating your WordPress URLs, moving files in your <a href=\"https:\/\/www.webhostingdelhi.net.in\/web-hosting-delhi\/\" rel=\"nofollow\">hosting account<\/a>, and ensuring that everything remains functional without disrupting the site. By carefully following the correct steps such as backing up your website, moving files via <a href=\"https:\/\/cpanel.net\/\" rel=\"nofollow noopener\" target=\"_blank\">cPanel<\/a> or FTP, and fixing internal links in the database you can successfully shift your site without losing content or breaking links. This guide will walk you through the essential steps to move WordPress from a subfolder to the root directory smoothly.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Step-by-Step Guide:<\/h2><nav><ul><li class=\"\"><a href=\"#backup-your-website\">Backup Your Website:<\/a><\/li><li class=\"\"><a href=\"#access-your-word-press-dashboard\">Access Your WordPress Dashboard:<\/a><\/li><li class=\"\"><a href=\"#update-word-press-address-and-site-address\">Update WordPress Address and Site Address:<\/a><\/li><li class=\"\"><a href=\"#move-word-press-files-in-c-panel\">Move WordPress from Subfolder to Root Directory<\/a><\/li><li class=\"\"><a href=\"#update-permalinks-optional-but-recommended\">Update Permalinks (Optional but Recommended):<\/a><\/li><li class=\"\"><a href=\"#check-and-update-your-htaccess-file-optional\">Check and Update Your .htaccess File (Optional):<\/a><\/li><li class=\"\"><a href=\"#test-your-website\">Test Your Website:<\/a><\/li><li class=\"\"><a href=\"#update-google-and-other-search-engines-if-necessary\">Update Google and Other Search Engines (if necessary):<\/a><\/li><li class=\"\"><a href=\"#additional-notes\">Additional Notes:<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"backup-your-website\"><strong>Backup Your Website:<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before making any changes, it&#8217;s crucial to back up both your website files and your WordPress database. You can use <a href=\"https:\/\/updraftplus.com\/\" rel=\"nofollow noopener\" target=\"_blank\">plugins like UpdraftPlus<\/a> or manually <a href=\"https:\/\/filezilla-project.org\/\" rel=\"nofollow noopener\" target=\"_blank\">back up via FTP<\/a> and <a href=\"https:\/\/www.phpmyadmin.net\/\" rel=\"nofollow noopener\" target=\"_blank\">phpMyAdmin<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"access-your-word-press-dashboard\"><strong>Access Your WordPress Dashboard:<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Log in to your WordPress admin panel which you need to Move WordPress from Subfolder to Root Directory.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"521\" height=\"433\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/image-13.png\" alt=\"\" class=\"wp-image-723\" style=\"width:350px;height:auto\" srcset=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/image-13.png 521w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/image-13-300x249.png 300w\" sizes=\"auto, (max-width: 521px) 100vw, 521px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"update-word-press-address-and-site-address\"><strong>Update WordPress Address and Site Address:<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Go to <strong>Settings > General<\/strong> in your WordPress dashboard.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"350\" height=\"221\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/image-14.png\" alt=\"\" class=\"wp-image-724\" srcset=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/image-14.png 350w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/image-14-300x189.png 300w\" sizes=\"auto, (max-width: 350px) 100vw, 350px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Update both the <strong>WordPress Address (URL)<\/strong> and <strong>Site Address (URL)<\/strong> fields to reflect the new root directory location. This typically means removing the subfolder from the URLs. For example, change <code>http:\/\/example.com\/subfolder<\/code> to <code>http:\/\/example.com<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"759\" height=\"119\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/image-15.png\" alt=\"\" class=\"wp-image-725\" srcset=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/image-15.png 759w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/image-15-300x47.png 300w\" sizes=\"auto, (max-width: 759px) 100vw, 759px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"move-word-press-files-in-c-panel\"><strong>Move WordPress from Subfolder to Root Directory<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Log in to your <strong>cPanel<\/strong>.<\/li>\n\n\n\n<li>Navigate to <strong>File Manager<\/strong> (usually located under the <strong>Files<\/strong> section).<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"246\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/Snag_f386a6-1.png\" alt=\"\" class=\"wp-image-727\" srcset=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/Snag_f386a6-1.png 716w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/Snag_f386a6-1-300x103.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enable Show Hidden Files in the settings.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"338\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/Snag_f426bf.png\" alt=\"\" class=\"wp-image-728\" srcset=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/Snag_f426bf.png 500w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/Snag_f426bf-300x203.png 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open the subfolder where your WordPress is currently installed (e.g., <code>\/public_html\/subfolder\/<\/code>).<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"320\" height=\"56\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/image-18.png\" alt=\"\" class=\"wp-image-732\" srcset=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/image-18.png 320w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/image-18-300x53.png 300w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click the <strong>Select all <\/strong>files option<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"392\" height=\"89\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/Snag_106da87.png\" alt=\"Move WordPress from Subfolder to Root Directory\" class=\"wp-image-729\" srcset=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/Snag_106da87.png 392w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/Snag_106da87-300x68.png 300w\" sizes=\"auto, (max-width: 392px) 100vw, 392px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In the pop-up, change the destination to the root directory (usually <code>\/public_html\/<\/code>) and click <strong>copy <\/strong>Files to Move WordPress from Subfolder to Root Directory<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"490\" height=\"121\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/image-16.png\" alt=\"\" class=\"wp-image-730\" srcset=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/image-16.png 490w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/image-16-300x74.png 300w\" sizes=\"auto, (max-width: 490px) 100vw, 490px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Note:<\/strong> Ensure that files like <code>wp-config.php<\/code> and the <code>.htaccess<\/code> file are also moved to the root folder.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">You can also<a href=\"https:\/\/filezilla-project.org\/\" rel=\"nofollow noopener\" target=\"_blank\"> use FTP client<\/a> to Move WordPress from Subfolder to Root Directory <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use FTP to access your server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Move all files from the subfolder (<code>\/subfolder\/<\/code>) to the root directory (<code>\/public_html\/<\/code>).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"update-permalinks-optional-but-recommended\"><strong>Update Permalinks (Optional but Recommended):<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To ensure all internal links work correctly, go to <strong>Settings > Permalinks<\/strong> and click <strong>Save Changes<\/strong> without making any modifications. This refreshes the permalinks structure.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"282\" height=\"178\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/10\/image-19.png\" alt=\"\" class=\"wp-image-733\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"check-and-update-your-htaccess-file-optional\"><strong>Check and Update Your .htaccess File (Optional):<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you have custom rules in your <code>.htaccess<\/code> file (located in your WordPress root directory), ensure they are still relevant for the new setup. Sometimes, WordPress automatically updates this file, but it&#8217;s good to double-check.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"test-your-website\"><strong>Test Your Website:<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Once Move WordPress from Subfolder to Root Directory, Visit your website to ensure everything is working correctly. Check various pages, posts, and functionality to confirm there are no broken links or issues.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"update-google-and-other-search-engines-if-necessary\"><strong>Update Google and Other Search Engines (if necessary):<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If your site has been indexed by search engines, you may need to update your sitemap and notify <a href=\"https:\/\/search.google.com\/search-console\/about\" rel=\"nofollow noopener\" target=\"_blank\">Google Search Console<\/a> (or other search engine tools) of the change in URL structure.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"additional-notes\">Additional Notes:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before moving WordPress from a subfolder to the root directory, ensure that all plugins and themes are updated to their latest versions. This helps avoid compatibility issues after migration. Next, verify your <strong>permalink structure<\/strong> by going to <strong>Settings &gt; Permalinks<\/strong> in your WordPress dashboard. Sometimes, permalinks can revert to default settings, so double-check to ensure they are configured correctly. If needed, simply click <strong>Save Changes<\/strong> to refresh the settings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Additionally, if you use caching plugins or if your host has server-side caching, be sure to clear these caches after moving the files. This ensures that your visitors see the updated version of your site with the new root directory URLs instead of cached versions of your subfolder URLs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Following these additional steps carefully will help ensure a smooth migration of your WordPress site from the subfolder to the root directory without encountering significant issues or downtime.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Move WordPress from Subfolder to Root Directory is a common task when reorganizing your website structure for better accessibility and SEO. This process involves updating your WordPress URLs, moving files in your hosting account, and ensuring that everything remains functional without disrupting the site. By carefully following the correct steps such as backing up your [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":735,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37,2],"tags":[69],"class_list":["post-721","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpanel","category-wordpress","tag-move-wordpress-from-subfolder-to-root-directory"],"_links":{"self":[{"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/posts\/721","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/comments?post=721"}],"version-history":[{"count":2,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/posts\/721\/revisions"}],"predecessor-version":[{"id":736,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/posts\/721\/revisions\/736"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/media\/735"}],"wp:attachment":[{"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/media?parent=721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/categories?post=721"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/tags?post=721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}