👉️ Steps:
- Install drupal via composer
composer create-project drupal-composer/drupal-project:8.x-dev my_site_name_dir --no-interaction
- Create a virtual host for the same.
👉️Create SSH key------------- | |
📌️ cd .ssh/ | |
📌️ ssh-keygen | |
📌️ hit enter threesies | |
📌️ to copy the key run cat id_rsa.pub | |
📌️ add the ssh key to the server as public key |
👉️ Steps:
composer create-project drupal-composer/drupal-project:8.x-dev my_site_name_dir --no-interaction
👉️sudo apt-get install php-xdebug | |
👉️sudo nano etc/php/7.2/apache2/php.ini | |
add xdebug.remote_enable=on | |
👉️xdebug.remote_enable=on | |
👉️sudo service apache2 restart |
<?php | |
use Drupal\Core\DrupalKernel; | |
use Symfony\Component\HttpFoundation\Request; | |
if (pathinfo(__FILE__, PATHINFO_FILENAME) == 'admin-pass-reset') { | |
die('Please change your file name to a random string to continue'); | |
} | |
// Boot Drupal. |
👉️Project Setup------------- | |
📌️ sudo chmod -R 755 /var/www/html/ | |
📌️ sudo chown -R $USER:www-data /var/www/html/ | |
📌️ navigate to the html folder and create a dirctory(e.g imc) | |
📌️ run the clone command via git (e.g. git clone --branch dev-test [email protected]:w3rwonat5hdu2.git ingrammicrocloud) | |
📌️ add settings.local.php to the /web/site/default directory and change the database & credentials | |
📌️ create database and upload .sql file from the terminal using source command | |
📌️ run composer install command | |
📌️ run drush cache rebuild command from /web directory (../vendor/bin/drush cr) | |
📌️ git pull origin master [To fetch the master branch]. |
1)👉️Install Apache: | |
I. sudo apt update | |
II. sudo apt install apache2 | |
III. sudo ufw allow 'Apache Full' | |
IV. sudo service apache2 restart | |
2)👉️Install Php | |
I. add-apt-repository ppa:ondrej/php | |
II. apt-get update | |
III. apt-get install php7.2 |
USEFULL COMMANDS------------------------------------------------- | |
😎️ man ls [to get the all info with the ls command] | |
q [ to quit the man command] | |
🤔️ gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize' [ minimize item on click from dock menu] | |
🤩️ ln -s /opt/lampp/htdocs ./Desktop [create soft link-shortcut of htdocs to desktop] | |
🤔️ gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize' [ minimize item on click from dock menu] | |
👉️third party directory: /etc & /usr/share | |
👉️Lamp Service Commands------------- | |
📌️ sudo systemctl status apache2 |
Go to xampp>phpMyadmin>libraries>classes>Display>Export.php | |
then find /* Scan for plugins */ | |
then add the flowing text above the line mentioned in previous step | |
//Export a single table | |
if(isset($_GET['single_table'])){ | |
$GLOBALS['single_table'] = $_GET['single_table']; | |
} |
add_filter( 'nav_menu_link_attributes', function ( $atts, $item, $args ) { | |
if ( 802 === $item->ID ) { // change 1161 to the ID of your menu item. | |
if(is_front_page() || is_home()){ | |
$atts['href'] = '#dine-in-menu'; | |
$atts['target'] = ''; | |
} | |
else{ | |
$atts['href'] = home_url('/#dine-in-menu'); | |
$atts['target'] = ''; |
Seller Account Details: | |
[email protected] | |
Apnapakistan1 | |
Main Admin Details: | |
admin | |
Apnapakistan1 |