{"id":13492822,"url":"https://github.com/VirtuBox/ubuntu-nginx-web-server","last_synced_at":"2025-03-28T11:30:47.611Z","repository":{"id":132823816,"uuid":"114089698","full_name":"VirtuBox/ubuntu-nginx-web-server","owner":"VirtuBox","description":"EasyEngine/WordOps optimized configuration on Ubuntu 16/18.04 LTS","archived":false,"fork":false,"pushed_at":"2019-11-07T11:22:20.000Z","size":458,"stargazers_count":108,"open_issues_count":2,"forks_count":29,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-10-19T07:53:19.732Z","etag":null,"topics":["configuration-files","easyengine","fail2ban","mariadb","netdata","nginx","nginx-configuration","proftpd","redis","ubuntu","ubuntu-server"],"latest_commit_sha":null,"homepage":"https://virtubox.github.io/ubuntu-nginx-web-server/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VirtuBox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-12-13T07:39:52.000Z","updated_at":"2024-08-29T19:39:12.000Z","dependencies_parsed_at":"2023-07-04T18:17:53.707Z","dependency_job_id":null,"html_url":"https://github.com/VirtuBox/ubuntu-nginx-web-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VirtuBox%2Fubuntu-nginx-web-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VirtuBox%2Fubuntu-nginx-web-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VirtuBox%2Fubuntu-nginx-web-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VirtuBox%2Fubuntu-nginx-web-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VirtuBox","download_url":"https://codeload.github.com/VirtuBox/ubuntu-nginx-web-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246020749,"owners_count":20710813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["configuration-files","easyengine","fail2ban","mariadb","netdata","nginx","nginx-configuration","proftpd","redis","ubuntu","ubuntu-server"],"created_at":"2024-07-31T19:01:09.554Z","updated_at":"2025-03-28T11:30:47.260Z","avatar_url":"https://github.com/VirtuBox.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# Optimized configuration for WordOps running on Ubuntu server\n\n## Server Stack\n\n- Ubuntu 16.04/18.04 LTS\n- Nginx 1.17.x / 1.16.x\n- PHP-FPM 7.2/7.3\n- MariaDB 10.3\n- REDIS 5.0\n- Memcached\n- Fail2ban\n- Netdata\n- UFW\n\n--------------------------------------------------------------------------------\n\n![](https://img.shields.io/github/license/virtubox/ubuntu-nginx-web-server.svg?style=flat) ![last-commit](https://img.shields.io/github/last-commit/virtubox/ubuntu-nginx-web-server.svg?style=flat) ![stars](https://img.shields.io/github/stars/VirtuBox/ubuntu-nginx-web-server.svg?style=flat)\n\n### Info\n\n**As EasyEngine v3 will no longer receive any updates, configurations available in this repository are being updated for [WordOps](https://wordops.net/) (EEv3 fork).**\n\nWe are currently contributing to WordOps project and several parts of this repository are already included in WordOps.\n\nAll previous configurations are still available in the branch [easyengine-v3](https://github.com/VirtuBox/ubuntu-nginx-web-server/tree/easyengine-v3).\n\n--------------------------------------------------------------------------------\n\n- [Initial configuration](#initial-configuration)\n\n  - [System update and packages cleanup](#system-update-and-packages-cleanup)\n  - [Install useful packages](#install-useful-packages)\n  - [Clone the repository](#clone-the-repository)\n  - [Updating the repository](#updating-the-repository)\n  - [Tweak Kernel \u0026 Increase open files limits](#tweak-kernel--increase-open-files-limits)\n  - [disable transparent hugepage for redis](#disable-transparent-hugepage-for-redis)\n\n- [WordOps Setup](#wordops-setup)\n\n  - [Install MariaDB 10.3](#install-mariadb-103)\n  - [MySQL Tuning](#mysql-tuning)\n  - [Increase MariaDB open files limits](#increase-mariadb-open-files-limits)\n  - [Setup cronjob to optimize your MySQL databases and repair them if needed](#setup-cronjob-to-optimize-your-mysql-databases-and-repair-them-if-needed)\n\n- [Install WordOps](#install-wordops)\n\n  - [enable wo bash_completion](#enable-wo-bash_completion)\n  - [Install Nginx, php7.2, and configure WO backend](#install-nginx-php72-and-configure-wo-backend)\n  - [Set your email instead of root@localhost](#set-your-email-instead-of-rootlocalhost)\n  - [Install Composer - Fix phpmyadmin install issue](#install-composer---fix-phpmyadmin-install-issue)\n  - [Allow shell for www-data for SFTP usage](#allow-shell-for-www-data-for-sftp-usage)\n  - [Set the proper alternative for /usr/bin/php](#set-the-proper-alternative-for-usrbinphp)\n\n- [NGINX Configuration](#nginx-configuration)\n\n  - [Additional Nginx configuration (/etc/nginx/conf.d)](#additional-nginx-configuration-etcnginxconfd)\n  - [Compile last Nginx mainline release with nginx-ee](#compile-last-nginx-mainline-release-with-nginx-ee-scripthttpsgithubcomvirtuboxnginx-ee)\n  - [Custom configurations](#custom-configurations)\n  - [Nginx optimized configurations](#nginx-optimized-configurations-choose-one-of-them)\n  - [Increase Nginx open files limits](#increase-nginx-open-files-limits)\n\n- [Security](#security)\n\n  - [Harden SSH Security](#harden-ssh-security)\n  - [UFW](#ufw)\n  - [Custom jails for fail2ban](#custom-jails-for-fail2ban)\n  - [Secure Memcached server](#secure-memcached-server)\n\n- [Optional](#optional)\n\n  - [proftpd](#proftpd)\n\n    - [Install proftpd](#install-proftpd)\n    - [Adding FTP users](#adding-ftp-users)\n\n  - [ee-acme-sh](#ee-acme-sh)\n\n  - [netdata](#netdata)\n\n  - [cht.sh (cheat)](#chtsh-cheat)\n\n  - [nanorc - Improved Nano Syntax Highlighting Files](#nanorc---improved-nano-syntax-highlighting-files)\n  - [Add WP-CLI \u0026 bash-completion for user www-data](#add-wp-cli--bash-completion-for-user-www-data)\n\n- [Cleanup previous EasyEngine v3](#cleanup-previous-easyengine-v3)\n\n  - [Removing previous php versions](#removing-previous-php-versions)\n\n--------------------------------------------------------------------------------\n\nConfiguration files with comments available by following the link **source**\n\n## Initial configuration\n\n### System update and packages cleanup\n\n```bash\napt-get update \u0026\u0026 apt-get dist-upgrade -y \u0026\u0026 apt-get autoremove --purge -y \u0026\u0026 apt-get clean\n```\n\n### Install useful packages\n\n```bash\nsudo apt-get install haveged curl git unzip zip fail2ban htop nload nmon ntp gnupg gnupg2 wget pigz tree ccze mycli -y\n```\n\n### Clone the repository\n\n```bash\ngit clone https://github.com/VirtuBox/ubuntu-nginx-web-server.git $HOME/ubuntu-nginx-web-server\n```\n\n### Updating the repository\n\n```bash\ngit -C $HOME/ubuntu-nginx-web-server pull origin master\n```\n\n### Tweak Kernel \u0026 Increase open files limits\n\n\u003cspan style=\"color: red\"\u003eIncluded by default in WordOps - this may not be needed anymore\u003c/span\u003e\n\n[source sysctl.conf](https://github.com/VirtuBox/ubuntu-nginx-web-server/blob/master/etc/sysctl.conf) - [limits.conf source](https://github.com/VirtuBox/ubuntu-nginx-web-server/blob/master/etc/security/limits.conf)\n\n```bash\ncp $HOME/ubuntu-nginx-web-server/etc/sysctl.d/60-ubuntu-nginx-web-server.conf /etc/sysctl.d/60-ubuntu-nginx-web-server.conf\n```\n\nUbuntu 16.04 LTS do not support the new tcp congestion control algorithm bbr, we will use htcp instead.\n\n```bash\n# On ubuntu 18.04 LTS\nmodprobe tcp_bbr \u0026\u0026 echo 'tcp_bbr' \u003e\u003e /etc/modules-load.d/bbr.conf\necho -e '\\nnet.ipv4.tcp_congestion_control = bbr\\nnet.ipv4.tcp_notsent_lowat = 16384' \u003e\u003e /etc/sysctl.d/60-ubuntu-nginx-web-server.conf\n\n# On ubuntu 16.04 LTS\nmodprobe tcp_htcp \u0026\u0026 echo 'tcp_htcp' \u003e\u003e /etc/modules-load.d/htcp.conf\necho 'net.ipv4.tcp_congestion_control = htcp' \u003e\u003e /etc/sysctl.d/60-ubuntu-nginx-web-server.conf\n```\n\nThen to apply the configuration :\n\n```bash\nsysctl -e -p /etc/sysctl.d/60-ubuntu-nginx-web-server.conf\n```\n\nIncrease openfiles limits\n\n```bash\nsudo bash -c 'echo -e \"*         hard    nofile      500000\\n*         soft    nofile      500000\\nroot      hard    nofile      500000\\nroot      soft    nofile      500000\\n\"  \u003e\u003e /etc/security/limits.conf'\n```\n\n### disable transparent hugepage for redis\n\n```bash\necho never \u003e /sys/kernel/mm/transparent_hugepage/enabled\n```\n\n--------------------------------------------------------------------------------\n\n## WordOps Setup\n\n### Install MariaDB 10.3\n\n\u003cspan style=\"color: red\"\u003eIncluded by default in WordOps - this may not be needed anymore\u003c/span\u003e\n\nInstructions available in [VirtuBox Knowledgebase](https://kb.virtubox.net/knowledgebase/install-latest-mariadb-release-easyengine/)\n\n```bash\nbash \u003c(wget -qO - https://downloads.mariadb.com/MariaDB/mariadb_repo_setup) --mariadb-server-version=10.3 --skip-maxscale -y\nsudo apt update \u0026\u0026 sudo apt install mariadb-server -y\n```\n\nSecure MariaDB after install by running the command :\n\n```bash\nmysql_secure_installation\n```\n\n### MySQL Tuning\n\nYou can download my example of my.cnf, optimized for VPS with 4GB RAM. [my.cnf source](https://github.com/VirtuBox/ubuntu-nginx-web-server/blob/master/etc/mysql/my.cnf)\n\n```bash\ncp -f $HOME/ubuntu-nginx-web-server/etc/mysql/my.cnf /etc/mysql/my.cnf\n```\n\nIt include modification of innodb_log_file_size variable, so you need to use the following commands to apply the new configuration :\n\n```bash\nsudo service mysql stop\n\nsudo mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bak\nsudo mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bak\n\nsudo service mysql start\n```\n\n### Increase MariaDB open files limits\n\n```bash\necho -e '[Service]\\nLimitNOFILE=500000' \u003e /etc/systemd/system/mariadb.service.d/limits.conf\n\nsudo systemctl daemon-reload\nsudo systemctl restart mariadb\n```\n\n### Setup cronjob to optimize your MySQL databases and repair them if needed\n\nOpen the crontab editor\n\n```bash\nsudo crontab -e\n```\n\nThen add the following cronjob\n\n```cronjob\n@weekly /usr/bin/mysqlcheck -Aos --auto-repair \u003e /dev/null 2\u003e\u00261\n```\n\n## Install WordOps\n\n```bash\n# noninteractive install - you can replace $USER with your username \u0026 root@$HOSTNAME by your email\nsudo bash -c 'echo -e \"[user]\\n\\tname = $USER\\n\\temail = root@$HOSTNAME\" \u003e $HOME/.gitconfig'\n\nwget -qO wo wops.cc \u0026\u0026 sudo bash wo\n```\n\n### enable wo bash_completion\n\n```bash\nsource /etc/bash_completion.d/wo_auto.rc\n```\n\n### Install Nginx, php7.2, php7.3, and configure WO backend\n\n```bash\nwo stack install\nwo stack install --php73\n```\n\n### Set your email instead of root@localhost\n\n```bash\necho 'root: my.email@address.com' \u003e\u003e /etc/aliases\nnewaliases\n```\n\n### Install Composer - Fix phpmyadmin install issue\n\n\u003cspan style=\"color: red\"\u003eIncluded by default in WordOps - this may not be needed anymore\u003c/span\u003e\n\n```bash\ncd ~/ ||exit\ncurl -sS https://getcomposer.org/installer | php\nmv composer.phar /usr/bin/composer\n\nchown www-data:www-data /var/www\nsudo -u www-data -H composer update -d /var/www/22222/htdocs/db/pma/\n```\n\n### Allow shell for www-data for SFTP usage\n\n```bash\nusermod -s /bin/bash www-data\n```\n\n## Install PHP\n\nThis section has been removed because WordOps already install PHP 7.2 \u0026 PHP 7.3 by default\n\n### Set the proper alternative for /usr/bin/php\n\nIf you want to choose which version of php to use with the command `php`, you can use the command `update-alternatives`\n\n```bash\n# php5.6\nsudo update-alternatives --install /usr/bin/php php /usr/bin/php5.6 80\n\n# php7.0\nsudo update-alternatives --install /usr/bin/php php /usr/bin/php7.0 80\n\n# php7.1\nsudo update-alternatives --install /usr/bin/php php /usr/bin/php7.1 80\n\n# php7.2\nsudo update-alternatives --install /usr/bin/php php /usr/bin/php7.2 80\n\n# php7.3\nsudo update-alternatives --install /usr/bin/php php /usr/bin/php7.3 80\n```\n\nThen you can check php version with command `php -v`\n\n## NGINX Configuration\n\n### Additional Nginx configuration (/etc/nginx/conf.d)\n\n\u003cspan style=\"color: red\"\u003eIncluded by default in WordOps - this may not be needed anymore\u003c/span\u003e\n\n- stub_status configuration on 127.0.0.1:80 : stub_status.conf\n- restore visitor real IP under Cloudflare : cloudflare.conf\n\n```bash\n# copy all common nginx configurations\ncp -rf $HOME/ubuntu-nginx-web-server/etc/nginx/conf.d/* /etc/nginx/conf.d/\n\n# commit change with git\n[ ! -d /etc/nginx/.git ] \u0026\u0026 { git -C /etc/nginx init; } git -C /etc/nginx/ add . \u0026\u0026 git -C /etc/nginx/ commit -m \"update conf.d configurations\"\n\n```\n\n### Compile the latest Nginx release with [nginx-ee](https://github.com/VirtuBox/nginx-ee)\n\n```bash\nbash \u003c(wget -O - virtubox.net/nginx-ee || curl -sL virtubox.net/nginx-ee)\n```\n\n--------------------------------------------------------------------------------\n\n## Custom configurations\n\n### Nginx optimized configurations\n\nChoose one of them\n\n```bash\n# TLSv1.2 TLSv1.3 only (recommended)\ncp -f $HOME/ubuntu-nginx-web-server/etc/nginx/nginx.conf /etc/nginx/nginx.conf\n\n# TLSv1.2 only\ncp -f $HOME/ubuntu-nginx-web-server/etc/nginx/nginx.conf /etc/nginx/nginx-tlsv12.conf\n```\n\n```bash\n# commit change with git\n[ ! -d /etc/nginx/.git ] \u0026\u0026 { git -C /etc/nginx init; } git -C /etc/nginx/ add . \u0026\u0026 git -C /etc/nginx/ commit -m \"update nginx.conf\"\n```\n\n### Nginx configuration for netdata\n\n\u003cspan style=\"color: red\"\u003eIncluded by default in WordOps - this may not be needed anymore\u003c/span\u003e\n\n```bash\n# add nginx reverse-proxy for netdata on https://yourserver.hostname:22222/netdata/\ncp -f $HOME/ubuntu-nginx-web-server/etc/nginx/sites-available/22222 /etc/nginx/sites-available/22222\n\n# commit change with git\n[ ! -d /etc/nginx/.git ] \u0026\u0026 { git -C /etc/nginx init; } git -C /etc/nginx/ add . \u0026\u0026 git -C /etc/nginx/ commit -m \"update 22222 configuration\"\n```\n\n#### Increase Nginx open files limits\n\n```bash\nsudo mkdir -p /etc/systemd/system/nginx.service.d\necho -e '[Service]\\nLimitNOFILE=500000' \u003e /etc/systemd/system/nginx.service.d/limits.conf\n\nsudo systemctl daemon-reload\nsudo systemctl restart nginx.service\n```\n\n--------------------------------------------------------------------------------\n\n## Security\n\n### Harden SSH Security\n\nWARNING : SSH Configuration with root login allowed using SSH keys only [source](https://github.com/VirtuBox/ubuntu-nginx-web-server/blob/master/etc/ssh/sshd_config)\n\n```bash\ncp -f $HOME/ubuntu-nginx-web-server/etc/ssh/sshd_config /etc/ssh/sshd_config\n```\n\n### UFW\n\nInstructions available in [VirtuBox Knowledgebase](https://kb.virtubox.net/knowledgebase/ufw-iptables-firewall-configuration-made-easier/)\n\n```bash\n# enable ufw log - allow outgoing - deny incoming\nufw logging low\nufw default allow outgoing\nufw default deny incoming\n\n# allow incoming traffic on SSH port\nCURRENT_SSH_PORT=$(grep \"Port\" /etc/ssh/sshd_config | awk -F \" \" '{print $2}')\nufw allow $CURRENT_SSH_PORT\n\n# DNS - HTTP/S - FTP - NTP - RSYNC - DHCP - EE Backend\nufw allow 53\nufw allow http\nufw allow https\nufw allow 21\nufw allow 123\nufw allow 68\nufw allow 546\nufw allow 873\nufw allow 22222\n\n\n# enable UFW\necho \"y\" | ufw enable\n```\n\n### Custom jails for fail2ban\n\n- wordpress bruteforce\n- ssh\n- recidive (after 3 bans)\n- backend http auth\n- nginx bad bots\n\n```bash\ncp -rf $HOME/ubuntu-nginx-web-server/etc/fail2ban/filter.d/* /etc/fail2ban/filter.d/\ncp -rf $HOME/ubuntu-nginx-web-server/etc/fail2ban/jail.d/* /etc/fail2ban/jail.d/\n\nfail2ban-client reload\n```\n\n### Secure Memcached server\n\n```bash\necho '-U 0' \u003e\u003e /etc/memcached.conf\nsudo systemctl restart memcached\n```\n\nIf you do not use memcached, you can safely stop it and disable it :\n\n```bash\nsudo systemctl stop memcached\nsudo systemctl disable memcached.service\n```\n\n--------------------------------------------------------------------------------\n\n## Optional\n\n### proftpd\n\n#### Install proftpd\n\n```bash\napt-get install proftpd -y\n```\n\nsecure proftpd and enable passive ports\n\n```bash\nsed -i 's/# DefaultRoot/DefaultRoot/' /etc/proftpd/proftpd.conf\nsed -i 's/# RequireValidShell/RequireValidShell/' /etc/proftpd/proftpd.conf\nsed -i 's/# PassivePorts                  49152 65534/PassivePorts                  49000 50000/' /etc/proftpd/proftpd.conf\n```\n\nrestart proftpd\n\n```bash\nsudo service proftpd restart\n```\n\nAllow FTP ports with UFW\n\n```bash\n# ftp active port\nsudo ufw allow 21\n\n# ftp passive ports\nsudo ufw allow 49000:50000/tcp\n```\n\nEnable fail2ban proftpd jail\n\n```bash\necho -e '\\n[proftpd]\\nenabled = true\\n' \u003e\u003e /etc/fail2ban/jail.d/custom.conf\n\nfail2ban-client reload\n```\n\n#### Adding FTP users\n\n```bash\n# create user without shell access in group www-data\nadduser --home /var/www/yourdomain.tld/ --shell /bin/false --ingroup www-data youruser\n\n# allow group read/write on website folder\nchmod -R g+rw /var/www/yourdomain.tld\n```\n\n--------------------------------------------------------------------------------\n\n### ee-acme-sh\n\n\u003cspan style=\"color: red\"\u003eIncluded by default in WordOps - this may not be needed anymore\u003c/span\u003e\n\n[Github repository](https://virtubox.github.io/ee-acme-sh/) - Script to setup letsencrypt certificates using acme.sh on EasyEngine servers\n\n- subdomain support\n- ivp6 support\n- wildcards certificates support\n\n```bash\nwget-qO install-ee-acme.sh https://raw.githubusercontent.com/VirtuBox/ee-acme-sh/master/install.sh\nchmod +x install-ee-acme.sh\n./install-ee-acme.sh\n\n# enable acme.sh \u0026 ee-acme-sh\nsource .bashrc\n```\n\n--------------------------------------------------------------------------------\n\n### netdata\n\n\u003cspan style=\"color: red\"\u003eIncluded by default in WordOps - this may not be needed anymore\u003c/span\u003e\n\n[Github repository](https://github.com/firehol/netdata)\n\n```bash\n# save 40-60% of netdata memory\necho 1 \u003e/sys/kernel/mm/ksm/run\necho 1000 \u003e/sys/kernel/mm/ksm/sleep_millisecs\n\n# install netdata\nbash \u003c(curl -Ss https://my-netdata.io/kickstart.sh) all --dont-wait\n\n# increase open files limits for netdata\nsudo mkdir -p /etc/systemd/system/netdata.service.d\necho -e '[Service]\\nLimitNOFILE=500000' \u003e /etc/systemd/system/netdata.service.d/limits.conf\n\nsudo systemctl daemon-reload\nsudo systemctl restart netdata.service\n\n# disable email notifications\nsudo sed -i 's/SEND_EMAIL=\"YES\"/SEND_EMAIL=\"NO\"/' /usr/lib/netdata/conf.d/health_alarm_notify.conf\nservice netdata restart\n```\n\n--------------------------------------------------------------------------------\n\n### cht.sh (cheat)\n\n[Github repository](https://github.com/chubin/cheat.sh)\n\n```bash\ncurl https://cht.sh/:cht.sh \u003e /usr/bin/cht.sh\nchmod +x /usr/bin/cht.sh\n\n\necho \"alias cheat='cht.sh'\" \u003e\u003e $HOME/.bashrc\nsource $HOME/.bashrc\n```\n\nusage : `cheat \u003ccommand\u003e`\n\n```bash\nroot@vps:~ cheat cat\n# cat\n\n# Print and concatenate files.\n\n# Print the contents of a file to the standard output:\n  cat file\n\n# Concatenate several files into the target file:\n  cat file1 file2 \u003e target_file\n\n# Append several files into the target file:\n  cat file1 file2 \u003e\u003e target_file\n\n# Number all output lines:\n  cat -n file\n```\n\n--------------------------------------------------------------------------------\n\n### nanorc - Improved Nano Syntax Highlighting Files\n\n[Github repository](https://github.com/scopatz/nanorc)\n\n```bash\nwget https://raw.githubusercontent.com/scopatz/nanorc/master/install.sh -qO- | sh\n```\n\n--------------------------------------------------------------------------------\n\n### Add WP-CLI \u0026 bash-completion for user www-data\n\n\u003cspan style=\"color: red\"\u003eIncluded by default in WordOps - this may not be needed anymore\u003c/span\u003e\n\n```bashrc\n# download wp-cli bash_completion\nwget -qO /etc/bash_completion.d/wp-completion.bash https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash\n\n# change /var/www owner\nchown www-data:www-data /var/www\n\n# download .profile \u0026 .bashrc for www-data\ncp -f $HOME/ubuntu-nginx-web-server/var/www/.* /var/www/\n\n# set owner\nchown www-data:www-data /var/www/{.profile,.bashrc}\n```\n\n## Cleanup previous EasyEngine v3\n\n\u003cspan style=\"color: red\"\u003eIncluded by default in WordOps - this may not be needed anymore\u003c/span\u003e\n\nEasyEngine migration to WordOps is now handled by the install script. The only step to finish the migration is to remove previous php versions if you don't need them anymore.\n\n### Removing previous php versions\n\n```bash\n# php5.6\napt-get -y autoremove php5.6-fpm php5.6-common --purge\n\n# php7.0\napt-get -y autoremove php7.0-fpm php7.0-common --purge\n```\n\nPublished \u0026 maintained by [VirtuBox](https://virtubox.net)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVirtuBox%2Fubuntu-nginx-web-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FVirtuBox%2Fubuntu-nginx-web-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVirtuBox%2Fubuntu-nginx-web-server/lists"}