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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Issue tags: +Novice

Probably a good Novice project?

tankerjoe’s picture

Status: Active » Needs review
FileSize
1.52 KB

Adds "Reinstall" section after the "Installation" section.

Dries Arnolds’s picture

Status: Needs review » Needs work
  1. +++ b/core/INSTALL.txt
    @@ -285,6 +286,37 @@ INSTALLATION
    +2. Remove everything in sites/default/files.  ¶
    

    whitespace problem

  2. +++ b/core/INSTALL.txt
    @@ -285,6 +286,37 @@ INSTALLATION
    +   ¶
    

    whitespace problem

  3. +++ b/core/INSTALL.txt
    @@ -285,6 +286,37 @@ INSTALLATION
    +   ¶
    +4. Follow the Installation Instructions above starting from Step 3 (Run the ¶
    

    whitespace problems

Dries Arnolds’s picture

Status: Needs work » Needs review
FileSize
3.12 KB

Made a patch for the changes in #3

jhodgdon’s picture

Status: Needs review » Needs work

This patch file is totally garbled when I view it in the browser.

Cyclodex’s picture

Assigned: Unassigned » Cyclodex
Cyclodex’s picture

Assigned: Cyclodex » Unassigned
Status: Needs work » Needs review
FileSize
1.51 KB

I 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:

+3. Remove sites/default/settings.php then create a new one using the file
+   sites/default/default.settings.php as a template.
+
+   For example, on a Unix/Linux command line, you can make a copy of the
+   default.settings.php file with the command:
+
+      cp sites/default/default.settings.php sites/default/settings.php
+
+   Next, grant write privileges to the file to everyone (including the web
+   server) with the command:
+
+      chmod a+w sites/default/settings.php
+
+   Be sure to set the permissions back after the reinstallation is finished!
+   Sample command:
+
+      chmod go-w sites/default/settings.php
+

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.

jhodgdon’s picture

Status: Needs review » Needs work

I 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).

maartendeblock’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
955 bytes

I agree, the information is double. This patch has the reinstall instructions without the double information.

JurgenR’s picture

Status: Needs review » Reviewed & tested by the community

At 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.

jhodgdon’s picture

Looks good, thanks!

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks again! Committed to 8.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.