Last active
August 29, 2015 14:23
-
-
Save onecooltaco/a58c29f07b9903adcb33 to your computer and use it in GitHub Desktop.
Update Drupal by patch file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # download a copy of current version and new updated drupal software. | |
| drush dl drupal-<<original verion>> | |
| drush dl drupal-<<new version>> | |
| # Use diff to create a patch of directories. | |
| diff -urN drupal-<<original verion>> drupal-<<new version>> > drupal-<<orig>>-to-<<new>>.patch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Use patch to apply the patch from the Drupal site root directory. Patch reads from standard imput. | |
| # Using –dry-run here does not apply the changes, just tells us what it would change. Do this first for testing. | |
| cd /path/to/drupal/root | |
| patch -p1 --dry-run < /path/to/drupal-<<orig>>-to-<<new>>.patch | |
| # The -p1 option removes the top level part of the file path from each file that's listed in the patch. | |
| # This is necessary because the files were originally in seperate directories. | |
| # If all looks good here, run it. | |
| patch -p1 < /path/to/drupal-6.20-to-6.22.patch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Run Update on the Database | |
| cd /path/to/drupal/root | |
| drush updatedb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment