A Pen by Teja Babu S on CodePen.
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
| #!/usr/bin/env bash | |
| # MySQL / MariaDB Dump Helper | |
| # =========================== | |
| # FEATURES: Progress bar with ETA, support multiple databases (dump into separated files) and password as argument | |
| # REQUIREMENTS: | |
| # ============= | |
| # GNU Core Utilities, mysql, mysqldump, pv (https://github.com/icetee/pv) |
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 | |
| # Source: http://www.jonasjohn.de/snippets/php/headers.htm | |
| // Use this header instruction to fix 404 headers | |
| // produced by url rewriting... | |
| header('HTTP/1.1 200 OK'); | |
| // Page was not found: | |
| header('HTTP/1.1 404 Not Found'); | |
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
| # Export site database using wp db export | |
| wp db export /wp-content/wordpress-dump.sql --all-tablespaces --single-transaction --quick --lock-tables=false | |
| # Gzip compress the recent database export | |
| gzip wordpress-dump.sql | |
| # Export sites database using wp db export and gzip compress | |
| wp db export --all-tablespaces --single-transaction --quick --lock-tables=false - | gzip -9 - > wordpress-dump.sql.gz | |
Сборка PHP (CLI, FPM) и XCache из исходников. Скрипт использовался для сборки под непривилегированным пользователем в свой домашний каталог, поэтому sudo не расставлены где надо.
Вначале нужно поставить зависимости. Для Debian примерно так (более-менее катит, доустановить что нужно по мере надобности):
$ sudo apt-get update
$ sudo apt-get install libbz2-dev libc6-dev libcomerr2 libdb5.1-dev libfreetype6-dev \
libgd2-xpm-dev libgssapi-krb5-2 libjpeg8-dev libk5crypto3 libkrb5-dev libmagic-dev \
libonig2 libpcre3-dev libpng12-dev libqdbm-dev libssl-dev libx11-dev libxml2-dev \
libxpm-dev mime-support tzdata ucf zlib1g-dev libcurl4-gnutls-dev libmcrypt-dev \
OlderNewer