How to move site from sub-folder to root directory
Permalink
Hi
I just started with c5 and need some help in moving my first site which I build on a sub-folder to try and now want to move it to root. I do not want to start all over again.
When I just move the all the files to root I only get access to the home page and not the rest and the dashboard.
I just started with c5 and need some help in moving my first site which I build on a sub-folder to try and now want to move it to root. I do not want to start all over again.
When I just move the all the files to root I only get access to the home page and not the rest and the dashboard.
1) Move all the files up
2) Redeclare where the web root is so it now uses your sites subfolder
3) Redeclare where the domain points, so it points to the subfolder.
(These all depend on your hosting provider and what their control panel interface is and allows you to do. Personally I have a preference for (3))
In all cases, it is likely the site will sort of work, but not quite. You will then need to make some small tweaks to paths in:
- config/site.php
- .htaccess (the rewrite rules)
- any hard coded internal links within the pages
Whatever solution you opt for, I suggest printing site.php and .htaccess before starting and looking for any paths in them that contain your subfolder. That way you have some clues of what you will need to change.