From fe6523b71dd01ab6f7bd901283352ffc831ed117 Mon Sep 17 00:00:00 2001 From: Bruno21 Date: Fri, 3 Jan 2025 07:45:13 +0100 Subject: [PATCH] 1st commit --- install_wp-cli.sh | 13 +++++++++++ install_wp.sh | 57 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 install_wp-cli.sh create mode 100644 install_wp.sh diff --git a/install_wp-cli.sh b/install_wp-cli.sh new file mode 100644 index 0000000..a379c09 --- /dev/null +++ b/install_wp-cli.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +# Télécharger +curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar + +# Test +php wp-cli.phar --info + +chmod +x wp-cli.phar +sudo mv wp-cli.phar /usr/local/bin/wp + +# Test +wp --info \ No newline at end of file diff --git a/install_wp.sh b/install_wp.sh new file mode 100644 index 0000000..8e19efd --- /dev/null +++ b/install_wp.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +#bdd +dbhost=localhost +dbuser=root +dbpass=qUtjnFdebz24N5Xy +dbname=wordpress4 +dbprefix=wp4_ +#wp +url=localhost +title="My WordPress blog" +admin_user=bruno +admin_password=kpm97321 +admin_email="bruno@clicclac.info" +default_theme=twentyseven +defaults_plugins="admin-post-navigation meow-lightbox" +locale=fr_FR +version=4.8 + +# Télécharger WordPress: +$ wp core download --locale=$locale --version=$version + +# Créer le fichier de config (wp-config.php): +#$ wp config create --dbname=testdb --dbuser=wp --dbpass=yourpassword +#$ wp core config --dbname=databasename --dbuser=databaseuser --dbpass=databasepassword --dbhost=localhost --dbprefix=prfx_ + +# Avec Des options supplémentaires: +$ wp core config --dbname=$dbname --dbuser=$dbuser --dbpass=$dbpass --dbhost=$dbhost --dbprefix=$dbprefix --extra-php < SELECT @@character_set_database, @@collation_database; + +# Installer WordPress: +$ wp core install --url=$url --title=$title --admin_user=$admin_user --admin_password=$admin_password --admin_email=$admin_email + +# Changement de la structure des liens pour ne conserver que le nom de l'article +$ wp rewrite structure '/%postname%' + +# Liste les thèmes trouvable dans l'installation +$ wp theme list + +# Installer un thème: +$ wp theme install $default_theme + +# Activer le thème: +$ wp theme activate $default_theme + +# Installer et activer les plugins: +#$ wp plugin install admin-post-navigation jetpack meow-lightbox simple-tags sola-newsletters wp-retina-2x-pro wp-super-cache --activate +$ wp plugin install $defaults_plugins --activate