Last active
February 13, 2018 10:20
-
-
Save xyulex/101edc0d9c02a7c912ae400df5c76da0 to your computer and use it in GitHub Desktop.
WP-CLI WordPress project start
This file contains 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
#!/bin/bash | |
mkdir $1 | |
cd $1 | |
wp core download # DescargaR el último WordPress | |
wp config create --dbname=$1 --dbuser=root --dbpass=root --locale=es_ES --force # Crear wp-config | |
wp db create # Crea la base de datos | |
wp core install --url="http://localhost/$1/" --title="$2" --admin_user="admin_$1" --admin_password="martin82" --admin_email="admin@admin.xxx" # Instalar WordPress | |
wp scaffold child-theme $1-child --parent_theme=twentyseventeen # Crear child-theme | |
wp theme activate $1-child # Activa el child-theme | |
wp plugin uninstall hello # Elimina 'Hello Dolly' | |
wp plugin install velvet-blues-update-urls --activate # Instalar Velvet | |
wp plugin install better-wp-security --activate # Instalar el iThemes | |
# Eliminado de ficheros inútiles | |
rm wp-config-sample.php | |
rm licencia.txt | |
rm license.txt | |
rm readme.html | |
# Crear mu-plugins con el fichero de customización como mu-plugins | |
cd wp-content/ | |
mkdir mu-plugins | |
cd mu-plugins | |
touch $1-customization.php | |
echo "<?php | |
/* | |
Plugin Name: $1 customization | |
Version: 1.0 | |
Author: Raúl Martínez | |
License: GPLv2 or later | |
Text Domain: $1-customization | |
*/" > $1-customization.php |
Author
xyulex
commented
Feb 13, 2018
- Instalar el último WordPress
- Instalar base de datos con el nombre del primer parámetro
- Crea y activa child-theme de nombre $1-child a partir de twentyseventeen
- Desinstala 'Hello dolly' e instala 'iThemes¡ y 'Velvet URLs'
- Borrar ficheros innecesarios
- Crea un plugin 'must-use' en 'mu-plugins/$1' para las personalizaciones especiales (así no se usa el functions.php de wp-content/themes/)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment