{"id":3351,"date":"2014-07-11T15:59:19","date_gmt":"2014-07-11T15:59:19","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2014\/07\/11\/move-subfolder-to-root\/"},"modified":"2021-08-16T22:58:31","modified_gmt":"2021-08-17T02:58:31","slug":"move-subfolder-to-root","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/","title":{"rendered":"How to move your Joomla application from a subfolder to the root folder."},"content":{"rendered":"<p>It is always a good idea to test your new site in a non-live location so that you can work with it, test, and make changes prior to making it live. Most often this is done in a subfolder, for instance <em>https:\/\/example.com\/test<\/em> when <em>example.com<\/em> is the live site that visitors will see.<\/p>\n<p>However, once you have decided to move the test site to the live section, you will need to know how to move it smoothly so that there are no errors. This article goes over how to move your Joomla site from a test subfolder to your root folder. This specifically assumes that you are not using a Joomla site as your main site prior to the move. Moving a site like this should only take a couple of minutes.<\/p>\n<h2>Preparing for the move<\/h2>\n<p>Before you do anything major to your site, you always want to make sure you have a backup plan. If something goes wrong during the move, you may need to roll back to your previous site while you investigate what went wrong. To that end, you need to make some preparations beforehand.<\/p>\n<h3>Make a cPanel backup<\/h3>\n<p>One of the easiest things to do is to <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/cpanel-backups\/\">make a cPanel backup<\/a> of your site files. This allows you to have a copy on hand that can be restored by our Live Support team for you.<\/p>\n<h3>Make a copy of the public_html folder<\/h3>\n<p>In this case, another option is to make a copy of your public_html folder. Simply copy the folder and name the new copy something like <em>public_html2<\/em> or <em>public_html_backup<\/em>. It can be anything you like really, but make it somethig you will remember should you need it. Should something go wrong, all you will need to do is to delete the current <em>public_html<\/em> folder and then copy the backup again, naming it <em>public_html<\/em>. That way you reset the folder and can start again. This method allows you to do so without having to involve our Live Support team and can save you some time.<\/p>\n<p>In our example, we will take the second option and make a copy of the <em>public_html<\/em> folder. Below you can see that we originally had a <em>public_html<\/em> folder under the root folder and now we have a <em>public_html2<\/em> folder as well. It is a duplicate copy of the <em>public_html<\/em> folder.<\/p>\n<p>BEFORE\/AFTER IMAGES HERE<\/p>\n<h2>Moving the files<\/h2>\n<ol class=\"article_list\">\n<li><a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/how-to-log-into-cpanel\/\">Log into your cPanel dashboard<\/a>.\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<li>Use the File Manager and open it to your public_html folder.\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<li>Navigate to the folder that contains your Joomla application.\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<li>HIghlight ALL files and folders in the directory.\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<li>Use the Copy feature in the cPanel to copy all the files and folders in your main Joomla folder up to the public_html directory. (Note that this will overwrite any files in the public_html folder that have the same name, commonly such as index.php, etc. But it will not affect your backup copy, so do not worry too much about that.)\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<li>Once certain that all files made it over during the copy you may now delete the old Joomla directory in the File Manager.\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<\/ol>\n<h2>Changing the configuration files<\/h2>\n<p>Now that you have copied the files over to the root directory for your account, you need to make some changes to your configuration file so that Joomla knows the new location for the files.<\/p>\n<ol class=\"article_list\">\n<li><a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/how-to-log-into-cpanel\/\">Log into your cPanel dashboard<\/a>.\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<li>Use the File Manager and open it to your public_html folder.\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<li>Use the Edit feature to open up the configuration.php file for editing.\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<li>Locate the log_path and tmp_path settings. Note that they should will still be pointing to the subfolder like below:\n<div class=\"code_block\">public $log_path = &#8216;\/home\/cpanel-username\/public_html\/joomla\/logs&#8217;;<br \/>\npublic $tmp_path = &#8216;\/home\/cpanel-username\/public_html\/joomla\/tmp&#8217;;<\/div>\n<p>Remove the old Joomla folder name so that the file appears similar to this:<\/p>\n<div class=\"code_block\">public $log_path = &#8216;\/home\/cpanel-username\/public_html\/logs&#8217;;<br \/>\npublic $tmp_path = &#8216;\/home\/cpanel-username\/public_html\/tmp&#8217;;<\/div>\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<li>Save the settings by clicking on the Save button in the upper right corner.\n<div style=\"clear: both;\"><\/div>\n<\/li>\n<\/ol>\n<p>Now you can visit your site at the root domain (example.com) instead of using the former subfolder (example.com\/joomla). If you have any issues, be sure to revisit the steps to ensure you did them correclty. If you are unsure where you went wrong, you may delete the public_html folder and then simply copy the backup public_html_backup as public_html.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is always a good idea to test your new site in a non-live location so that you can work with it, test, and make changes prior to making it live. Most often this is done in a subfolder, for instance https:\/\/example.com\/test when example.com is the live site that visitors will see. However, once you<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/\"> Read More ><\/a><\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[94],"tags":[4404],"class_list":["post-3351","post","type-post","status-publish","format-standard","hentry","category-joomla-3","tag-joomla-v3"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to move your Joomla application from a subfolder to the root folder. | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"Learn how to move your Joomla application from a subfolder to the root directory for your hosting account.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to move your Joomla application from a subfolder to the root folder. | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"Learn how to move your Joomla application from a subfolder to the root directory for your hosting account.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2014-07-11T15:59:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-17T02:58:31+00:00\" \/>\n<meta name=\"author\" content=\"Scott Mitchell\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Scott Mitchell\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/\"},\"author\":{\"name\":\"Scott Mitchell\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed\"},\"headline\":\"How to move your Joomla application from a subfolder to the root folder.\",\"datePublished\":\"2014-07-11T15:59:19+00:00\",\"dateModified\":\"2021-08-17T02:58:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/\"},\"wordCount\":761,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"keywords\":[\"Joomla v3\"],\"articleSection\":[\"Joomla 3\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/\",\"name\":\"How to move your Joomla application from a subfolder to the root folder. | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2014-07-11T15:59:19+00:00\",\"dateModified\":\"2021-08-17T02:58:31+00:00\",\"description\":\"Learn how to move your Joomla application from a subfolder to the root directory for your hosting account.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to move your Joomla application from a subfolder to the root folder.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed\",\"name\":\"Scott Mitchell\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/scott\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to move your Joomla application from a subfolder to the root folder. | InMotion Hosting","description":"Learn how to move your Joomla application from a subfolder to the root directory for your hosting account.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/","og_locale":"en_US","og_type":"article","og_title":"How to move your Joomla application from a subfolder to the root folder. | InMotion Hosting","og_description":"Learn how to move your Joomla application from a subfolder to the root directory for your hosting account.","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2014-07-11T15:59:19+00:00","article_modified_time":"2021-08-17T02:58:31+00:00","author":"Scott Mitchell","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Scott Mitchell","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/"},"author":{"name":"Scott Mitchell","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed"},"headline":"How to move your Joomla application from a subfolder to the root folder.","datePublished":"2014-07-11T15:59:19+00:00","dateModified":"2021-08-17T02:58:31+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/"},"wordCount":761,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"keywords":["Joomla v3"],"articleSection":["Joomla 3"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/","name":"How to move your Joomla application from a subfolder to the root folder. | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2014-07-11T15:59:19+00:00","dateModified":"2021-08-17T02:58:31+00:00","description":"Learn how to move your Joomla application from a subfolder to the root directory for your hosting account.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/move-subfolder-to-root\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to move your Joomla application from a subfolder to the root folder."}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/d850efb28ef3573db7d24b0d8fa9eaed","name":"Scott Mitchell","url":"https:\/\/www.inmotionhosting.com\/support\/author\/scott\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":{"id":94,"name":"Joomla 3","slug":"joomla-3","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/joomla\/joomla-3\/"},"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/3351","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=3351"}],"version-history":[{"count":5,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/3351\/revisions"}],"predecessor-version":[{"id":84218,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/3351\/revisions\/84218"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=3351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=3351"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=3351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}