📌️ sudo nano /etc/apache2/sites-available/platform.conf
📌️ add the following code-
<VirtualHost *:80>
ServerAdmin me@myserver
DocumentRoot /var/www/html/your_folder_name/ingrammicrocloud/web
ServerName platform.local
ServerAlias *.platform.local
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
| 👉️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:
- 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.
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
| 👉️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 |
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
| <?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. |
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
| 👉️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]. |
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
| 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 |
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
| 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 |
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
| 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']; | |
| } |
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
| 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'] = ''; |