info:concrete5:58:move

move / migrate

How to move a concrete5 website from a subdirectory to the root directory of your webserver?

If you want to move your concrete5's website from one server (eg localhost) to another server, please see the official documentation:

Now, considering you just want to move your website from a subdirectory to the root directory (or the reverse), here is a small doc

For instance, you want to move your website from
 https://YourwebSite/PreviousSubDirectory 

to

 https://YourwebSite/
# This doc is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details, 
# https://www.gnu.org/licenses/gpl-3.0.en.html
  • First, upgrade your website if required
  • Log as an admin in your website:
 https://YourwebSite/PreviousSubDirectory/index.php/login
  • Clear the cache from the dashboard
  • Put your website in maintenance
  • If you don't have a recent one, MAKE A COMPLETE BACKUP (website + database)
  • Go to your system files (FTP or SSH)
  • Move ALL the files from the subdirectory to the root directory
  • fix the permissions by running this command
 chmod -R 777 packages application/config/ application/files/ application/languages

if you have any, edit your .htaccess file:

replace
RewriteBase /PreviousSubDirectory/

with

 RewriteBase /
https://YourwebSite/index.php/dashboard/system/permissions/maintenance

* Done!

After that, you may check your website, mostly dead links with a tool like linkchecker; a dirty solution would be to make a rewriteRule redirecting your old /PreviousSubDirectory/ to the root directory

  • info/concrete5/58/move.txt
  • Dernière modification : 2019/09/03 13:24
  • de radeff