Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
## | |
# @server studio | |
# @host hackisition.com | |
# @desc nginx host rules | |
# @author Julien Le Coupanec <julien@gentlenode.com> | |
## | |
# HTTP Server | |
server { | |
listen 80; |
function yoast_clear_sitemap( $output, $url ) { | |
$timezone = new WPSEO_Sitemap_Timezone(); | |
$date = null; | |
if ( ! empty( $url['mod'] ) ) { | |
$date = $timezone->format_date( $url['mod'] ); | |
} |
<?php | |
/** | |
* 1. В таблице wp_options находим ключ yoast-seo-premium_license или wordpress-seo-premium_license | |
* и меняем его значение на `a:3:{s:3:"key";s:6:"zalupa";s:6:"status";s:5:"valid";s:11:"expiry_date";s:19:"2970-01-01 00:00:00";}` | |
* | |
* 2. Чтобы не слетали все ваши махинации после захода на страницу обновления или проверки лицензии, | |
* достаточно запретить плагину ломиться по своему АПИ на свой сайт. | |
* Я это сделал просто: в файле \wordpress-seo-premium\vendor\yoast\license-manager\class-update-manager.php | |
*/ |
#!/usr/bin/env bash | |
# Exit if any command fails | |
set -o errexit | |
# Exit if trying to use undeclared var | |
set -o nounset | |
# On piped commands, use the exit status of the last command throwing a non-zero exit code |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
#!/bin/sh | |
# PATH TO YOUR HOSTS FILE | |
ETC_HOSTS=/etc/hosts | |
# DEFAULT IP FOR HOSTNAME | |
IP="127.0.0.1" | |
# Hostname to add/remove. | |
HOSTNAME=$1 |
#!/bin/sh | |
UNAME=$(uname) | |
if [ "$UNAME" == "Linux" ] ; then | |
echo "Linux" | |
elif [ "$UNAME" == "Darwin" ] ; then | |
echo "Darwin" | |
elif [[ "$UNAME" == CYGWIN* || "$UNAME" == MINGW* ]] ; then |
docker cp <dbfile.sql> <container>:/tmp/import.sql | |
docker exec -it <container> /bin/bash | |
mysql -u <user> -p <database name> < import.sql |
Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.