Skip to main content

First transfer the drupal-8.8.x.tar.gz file to your directory

Via your ssh program (for us Terminal on OSX), enter the path to the directory where you transferred the drupal-8.8.x file

gunzip -c drupal-8.8.0.tar.gz | tar xopf -

rm -rf /var/www/vhosts/example.com/subdir/drupal-8.8.0.tar.gz

rm -rf /var/www/vhosts/example.com/subdir/core
; rm -rf /var/www/vhosts/example.com/subdir/modules
; rm -rf /var/www/vhosts/example.com/subdir/profiles
; rm -rf /var/www/vhosts/example.com/subdir/sites
; rm -rf /var/www/vhosts/example.com/subdir/themes
rm -rf /var/www/vhosts/example.com/subdir/vendor
rm -rf /var/www/vhosts/example.com/subdir/autoload.php
; rm -rf /var/www/vhosts/example.com/subdir/composer.json
rm -rf /var/www/vhosts/example.com/subdir/composer.lock
rm -rf /var/www/vhosts/example.com/subdir/example.gitignore
rm -rf /var/www/vhosts/example.com/subdir/index.php
rm -rf /var/www/vhosts/example.com/subdir/update.php
rm -rf /var/www/vhosts/example.com/subdir/robots.txt
rm -rf /var/www/vhosts/example.com/subdir/web.config

rm -rf /var/www/vhosts/example.com/subdir/drupal-8.8.0/LICENSE.txt
rm -rf /var/www/vhosts/example.com/subdir/drupal-8.8.0/README.txt

cd drupal-8.8.0

mv "core" ../
;mv "modules" ../
;mv "profiles" ../
;mv "sites" ../
;mv "themes" ../
mv "vendor" ../

mv "autoload.php" ../
;mv "composer.json" ../
mv "composer.lock" ../
mv "index.php" ../
mv "robots.txt" ../
mv "update.php" ../
mv "web.config" ../

cd ..

rm -rf /var/www/vhosts/example.com/subdir/drupal-8.8.0

chown your_username:psacln -R /var/www/vhosts/example.com/subdir/core
chown your_username:psacln -R /var/www/vhosts/example.com/subdir/modules
chown your_username:psacln -R /var/www/vhosts/example.com/subdir/profiles
chown your_username:psacln -R /var/www/vhosts/example.com/subdir/themes
chown your_username:psacln -R /var/www/vhosts/example.com/subdir/sites
chown your_username:psacln -R /var/www/vhosts/example.com/subdir/vendor

chown your_username:psacln -R /var/www/vhosts/example.com/subdir/autoload.php
chown your_username:psacln -R /var/www/vhosts/example.com/subdir/composer.lock
chown your_username:psacln -R /var/www/vhosts/example.com/subdir/composer.json
chown your_username:psacln -R /var/www/vhosts/example.com/subdir/index.php
chown your_username:psacln -R /var/www/vhosts/example.com/subdir/robots.txt
chown your_username:psacln -R /var/www/vhosts/example.com/subdir/update.php
chown your_username:psacln -R /var/www/vhosts/example.com/subdir/web.config

composer update

 

As a general rule, we comment out the paths that we don't want altered.  This is so we have a complete overview of the directory and the elements that we do and don't want updated.

Related articles

Andrew Fletcher04 Apr 2025
Managing .gitignore changes
When working with Git, the .gitignore file plays a critical role in controlling which files and folders are tracked by version control. Yet, many developers are unsure when changes to .gitignore take effect and how to manage files that are already being tracked. This uncertainty can lead to...
Andrew Fletcher26 Mar 2025
How to fix the ‘Undefined function t’ error in Drupal 10 or 11 code
Upgrading to Drupal 10.4+ you might have noticed a warning in their code editor stating “Undefined function ‘t’”. While Drupal’s `t()` function remains valid in procedural code, some language analysis tools — such as Intelephense — do not automatically recognise Drupal’s global functions. This...
Andrew Fletcher17 Mar 2025
Upgrading to PHP 8.4 challenges with Drupal contrib modules
The upgrade from PHP 8.3.14 to PHP 8.4.4 presents challenges for Drupal 10.4 websites, particularly when dealing with contributed modules. While Drupal core operates seamlessly, various contrib modules have not yet been updated to accommodate changes introduced in PHP 8.4.x. This has resulted in...