In D7, if you wanted to reinstall Drupal from scratch, you could pretty much just wipe the database and go.
In D8, it is not that simple. You need to:
- Remove everything in sites/default/files [especially the config and php directories I think?]
- Remove your settings.php file and recreate by copying from default.settings.php
- Make sure that sites/default/files and sites/default/files/settings.php are writeable by your Apache web user
- Drop all the tables in your database
timplunkett has this script:
#!/bin/bash
drush sql-drop -y;
sudo rm -rf sites/default/;
sudo git co -- sites/default/;
sudo chmod -R 777 sites/default/;
sudo chown -R `whoami` sites/default;
sudo git co -- sites/default;
sudo chown -R `whoami` sites/default;
drush si --db-url=mysql://root:root@localhost/d8 -y
Anyway... We should add instructions to INSTALL.txt about this. Especially for module developers and core devs, it's such a common thing to need to do... should be documented?
Comments
Comment #1
jhodgdonProbably a good Novice project?
Comment #2
tankerjoe CreditAttribution: tankerjoe commentedAdds "Reinstall" section after the "Installation" section.
Comment #3
Dries Arnoldswhitespace problem
whitespace problem
whitespace problems
Comment #4
Dries ArnoldsMade a patch for the changes in #3
Comment #5
jhodgdonThis patch file is totally garbled when I view it in the browser.
Comment #6
Cyclodex CreditAttribution: Cyclodex commentedComment #7
Cyclodex CreditAttribution: Cyclodex commentedI first did not understand what you meant with garbled, but when applying the patch it did not work:
patch: **** Only garbage was found in the patch input.
So I just re-made the patch here. But I think we should review the content too these parts:
Should we really mention that? Why not just go and start from Step 2 over.
And note, please take care how you are creating patches, it seems you have some wrong new lines stuff in there or so.
Comment #8
jhodgdonI agree. It seems that you need to remove the existing settings.php file and make sure that the sites/default directory is writeable (which it probably isn't after you had previously installed Drupal). Then you can go on to step 3 and run the install script (which already has instructions on how to create the settings file if Drupal cannot).
Comment #9
maartendeblock CreditAttribution: maartendeblock commentedI agree, the information is double. This patch has the reinstall instructions without the double information.
Comment #10
JurgenR CreditAttribution: JurgenR commentedAt first I had some questions about 3) Remove sites/default/settings.php. because this file usually doesn't need to change.
But then I realised that usually isn't always so I agree with the information, which is clean and helpfull.
Comment #11
jhodgdonLooks good, thanks!
Comment #12
jhodgdonThanks again! Committed to 8.x.