sudo find . -type f -exec chmod 644 {} ;
sudo find . -type d -exec chmod 755 {} ;
zip -r hello-world.zip hello-world
zip -r hello-world-child.zip hello-world-child
zip -r hello-world-addons.zip hello-world-addons
But make sure you neeed to navigate themes folder and plugins folder respectively
sudo chmod -R 0777 /var/www/html/demo
sudo chown -R www-data:www-data /var/www/html/demo
/etc/init.d/apache2 restart
sudo /etc/init.d/apache2 restart
sudo service apache2 restart
/etc/init.d/apache2 stop
sudo /etc/init.d/apache2 stop
sudo service apache2 stop
tar -zcvf public_html_10_july_2018.tar.gz public_html/*
mysqldump -u [dbusername] -p [dbpassword] > demo_dev_10_july_2018.sql
tar -zxvf FILENAME.tar.gz
tar -zcvf rm_wp_live_22-July-2022.tar.gz rm_wp_live_22-July-2022.sql
For example, to mount the //ServerIP/ServerShare file system to the /mnt/directory directory you would use:
sudo mount //ServerIP/ServerShare /mnt/directory -o username=[username],password=[password],file_mode=0777,dir_mode=0777
mysqldump -h localhost -u root -p'mysql123' db-wordpess_demo > dump.sql
mysql -h localhost -u root -p'mysql123' db-wordpess_demo < /home/sys37/Downloads/wordpess-demo.sql
git --version
sudo apt update
sudo apt install git
Configuration can be achieved by using the git config command.
git config --global user.name "Your Name"
git config --global user.email "youremail@domain.com"
We can display all of the configuration items that have been set by typing:
git config --list
To remove just git package itself from Ubuntu 14.04 execute on terminal:
sudo apt-get remove git
Uninstall git and it's dependent packages
sudo apt-get remove --auto-remove git
Purging git
sudo apt-get purge git
sudo apt-get purge --auto-remove git
git clone https://github.com/[username]/[repository-name].git
enter Username and password
git branch
git checkout -b develop
git pull origin develop
Run git status
command to check list of updated files.
git add -A
git commit -m "All files uploaded"
git push origin develop
REFERENCE LINK: https://github.com/joshnh/Git-Commands
Install composer globally composer using this article https://www.digitalocean.com/community/tutorials/how-to-install-and-use-composer-on-ubuntu-20-04
Open terminal and type whereis composer
, composer should be installed on this path /usr/local/bin/composer
composer global require squizlabs/php_codesniffer
composer global require wp-coding-standards/wpcs
composer global require phpcompatibility/php-compatibility
composer global require dealerdirect/phpcodesniffer-composer-installer
(i) PHP Intelephense - Ben Mewburn
(ii) phpcs - Ioannis Kappas
(iii) WordPress Hooks Intellisense - johnbillion
{
"php.validate.executablePath": "/usr/bin/php",
"phpcs.enable": true,
"phpcs.executablePath" : "/home/[system-name]/.config/composer/vendor/bin/phpcs",
"phpcs.standard": "WordPress",
"[php]": {
"editor.defaultFormatter": "bmewburn.vscode-intelephense-client"
},
}
[system-name] - like sys31 or systemdell etc...
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get -y install php7.4-common php7.4-mysql libapache2-mod-php7.4 php7.4-mcrypt php7.4-mbstring php7.4-curl php7.4-cli php7.4-mysql php7.4-gd php7.4-intl php7.4-xsl php7.4-zip php7.4-xml
sudo a2dismod php5.6 sudo a2dismod php7.0 sudo a2dismod php7.1 sudo a2dismod php7.2 sudo a2dismod php7.3 sudo a2dismod php8.0 sudo a2dismod php8.1
sudo a2enmod php7.4
sudo update-alternatives --set php /usr/bin/php7.4
sudo systemctl restart apache2
https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-20-04
php -v
php -m
apache2 -v
First of all, you need to install node.js on your system. Use following set of commands to add node.js PPA in your Ubuntu system and install it.
sudo apt-get install python-software-properties
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install nodejs
node --version
npm --version
Gulp can be easily use in your existing Node.js application. You just need to install Gulp package for Node.js in your project. For this tutorial, I am creating a sample Node.js application with NPM.
mkdir gulp-project && cd gulp-project
npm init
This command will prompt the required information to initialize a new empty project under the current directory.
Input all the required details for your application. At the end, it will show you the details you input and ask you to confirm.
{
"name": "gulp-project",
"version": "1.0.0",
"description": "First gulp application by Tecadmin",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"gulp",
"app"
],
"author": "TecAdmin",
"license": "ISC"
}
Once you have an node.js application. Use the following commands to install Gulp CLI globally on your system.
npm install -g gulp-cli
Also install the gulp package in your application. Swith to your application directory and execute the following command.
npm install --save-dev gulp
All done, Let’s check the installed version of Gulp CLI on your system and Gulp module in your application with the following command.
gulp --version
var gulp = require('gulp');
gulp.task('hello', function(done) {
console.log('Hello World!!!');
done();
})
gulp hello
npm install gulp-sourcemaps node-sass gulp-clean-css gulp-webserver gulp-sass gulp-ruby-sass gulp-autoprefixer gulp-minify-css gulp-rename gulp-changed gulp-imagemin gulp-concat gulp-uglify main-bower-files gulp-watch gulp-livereload browser-sync --save-dev