9/26/2023 0 Comments Drupal login thru ssh![]() When you host a site, one of the first questions your asked is do you have the ability to back up and restore my site if something breaks?įor obvious reasons, that’s an important question. If you used the web directory, you’ll need to update the root of your website to point to the web folder.I host a number of Drupal sites as well as wordpress and custom made ones as wel. IMPORTANT: if you used admin/admin as your user on the gitpod site – you should definitely update both: People->edit user 1->enter the current password, change the username and provide a secure password. ![]() Clear cache from the terminal: drush cr or go to: Configuration->Development->Performance->Clear all caches.Download this file and upload it to the themes directory on your live server. ie: tar -czvf name_of_theme (replace name_of_theme). If you’re using a custom theme on your Gitpod site, head back to the terminal, go to the Themes directory and compress the theme.On your new live site, head over to Configuration->Development->Backup and Migrate->Restore. Restore Database using Backup/Migrate.If you have custom modules repeat the above : tar -czvf custom.Download the tar file, upload it to your live server and expand it in the /modules folder. On your Gitpod site, navigate to the modules folder in the terminal window and execute tar -czvf contrib. OR create a tar file of the modules from Gitpod.io, upload, expand, then enable with drush or the UI.using composer and drush (if available).Install and enable ALL the modules from the gitpod site (including Core Modules).This is where you’ll need the new database information. In your browser, navigate to the site folder and complete the Drupal site setup in the UI.This will install Drupal in the root of your website inside a “web” folder. ( replace public_html with the name of your root web folder). Make sure your public_html (or root web directory) is completely empty.Ĭomposer create-project drupal/recommended-project:9.5 public_html.If you don’t, you’ll need to request it from your web host before you proceed. Open a terminal window (in CPanel this should be available if you have enough access.Make sure you record the database, database user and password, you’ll need these later. Head over to your live web host and create a new database.If you have Private Files change the Backup Source to Private Files Directory and click Backup Now.If you have a lot of files, this might take some time. Change the Backup Source to Public Files Directory and click Backup Now.The database will be compressed and downloaded.Select Default Drupal Database and the Download option (these are the defaults). ![]() Go to Configuration->Development->Backup and Migrate->Backup->Quick Backup.Use Backup and Migrate to backup the database and public directory (download these to your computer).If it’s not, use the following commands to update your site.Ĭomposer update "drupal/*" -with-all-dependencies Head over to Reports->Available Updates to determine if your site is completely current. Make sure the current site and all projects are up-to-date.(If you’d rather watch a video of the following steps – head to the bottom of this post.) The Steps: If you have questions, please contact your host: hosting environments can be very different one to another. It’s beyond the scope of this tutorial to explain setting up domains, sub-domains, databases and all the things you’ll need at your live server.A fresh domain/sub-domain, an empty database (usually MySQL) and a way to access them – usually CPanel.If you’re on a shared host such as GoDaddy etc, you won’t be able to move your Drupal site via this tutorial. SSH or Terminal access at the web host you want to move the site to (We’ll be using HiVelocity as our web host for this tutorial).A site ready to be transferred at gitpod.io.It’s really great to be able to build sites where no-one can see them until they’re ready! However, when you ARE ready, moving a Drupal site isn’t all that straightforward! ![]() It’s really an amazing environment that helps students learn Composer, Drush and Drupal along with our course and it’s completely free! (watch installation video at the link above) But how can I move the site I build to a live server? This repository is a one-click installation of DDEV, Composer, Drush and Drupal 9 (at the time of this writing). Currently, if someone doesn’t have a Drupal environment to practice on, we recommend a Github repository that creates a site at Gitpod.io ( ). Our Drupal 9 Explained course is move effective when every student does the work along with the videos.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |