Difference between revisions of "Drupal"

From DUNE
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
=About this page=
 
=About this page=
This page is essentially a scratch space to collect notes about Drupal configuration and management.
+
This page is essentially a scratch space to collect misc notes about Drupal configuration and management.
  
 
=Examples of the filesystem layout=
 
=Examples of the filesystem layout=
Line 12: Line 12:
 
</pre>
 
</pre>
  
==DB==
+
=DB=
 +
==Server and Credentials==
 
<pre>
 
<pre>
 
./public_html/web/sites/default/settings.php
 
./public_html/web/sites/default/settings.php
 
</pre>
 
</pre>
  
=DB maintenance=
+
==Maintenance==
 
Example of a MySQL dump:
 
Example of a MySQL dump:
 
<pre>
 
<pre>
 
mysqldump eicugorg_eic_drupal -u myUser -p > mydump.sql
 
mysqldump eicugorg_eic_drupal -u myUser -p > mydump.sql
 
</pre>
 
</pre>
 +
 +
=Drupal Version Upgrade=
 +
Just an illustration of how to keep custom themes and site settings when
 +
putting in place a new version of Drupal:
 +
<pre>
 +
mv  includes/ ~/my_includes
 +
cp -r ~/drupal-7.65 new_web
 +
cd new_web/
 +
rm -fr sites
 +
cp -r ../web/sites .
 +
cp ../web/robots.txt .
 +
diff ../web/robots.txt robots.txt
 +
cp ../web/.htaccess .
 +
diff ../web/.htaccess .htaccess
 +
cd ..
 +
mv web old_web
 +
mv new_web/ web
 +
cp -r old_web/themes/business_responsive_theme/ web/themes/
 +
</pre>
 +
 +
One should carefully "diff" the includes and modules to see if all are in place.
 +
In the example above, it is assumed that these checks have been done.

Latest revision as of 00:38, 14 May 2019

About this page

This page is essentially a scratch space to collect misc notes about Drupal configuration and management.

Examples of the filesystem layout

Files, Libraries, Themes

./public_html/web/sites/default/files/
./public_html/web/sites/all/libraries/
./public_html/web/sites/all/themes/

DB

Server and Credentials

./public_html/web/sites/default/settings.php

Maintenance

Example of a MySQL dump:

mysqldump eicugorg_eic_drupal -u myUser -p > mydump.sql

Drupal Version Upgrade

Just an illustration of how to keep custom themes and site settings when putting in place a new version of Drupal:

mv  includes/ ~/my_includes
cp -r ~/drupal-7.65 new_web
cd new_web/
rm -fr sites
cp -r ../web/sites .
cp ../web/robots.txt .
diff ../web/robots.txt robots.txt
cp ../web/.htaccess .
diff ../web/.htaccess .htaccess
cd ..
mv web old_web
mv new_web/ web
cp -r old_web/themes/business_responsive_theme/ web/themes/

One should carefully "diff" the includes and modules to see if all are in place. In the example above, it is assumed that these checks have been done.