$ sudo su - postgres $ psql $ create database wordpress; # facultatif ------------------------------------------------ $ create user your_user with password ‘your_password’; $ grant all privileges on database your_database to your_user; $ \q
wordpress = nom de la base
# aller sur son repertoire $ cd /var/www/html/wordpress_pg2/ $ wget https://wordpress.org/latest.tar.gz # Then unzip the package using $ tar -xzvf latest.tar.gz # Remove the zip file $ rm -rf latest.tar.gz
wordpress s installe dans une directory wordpress
$ cd wp-content $ git clone https://github.com/kevinoid/postgresql-for-wordpress.git $ mv postgresql-for-wordpress/pg4wp Pg4wp $ rm -rf postgresql-for-wordpress $ cp Pg4wp/db.php db.php *** erreur PG4WP not found avec install.php $ mv Pg4wp pg4wp
directory
wordpress L wp-content -db.php L pg4wp L wp-admin -install.php -wp-config.php
/** The name of the database for WordPress */ define('DB_NAME', 'wordpress'); /** MySQL database username */ define('DB_USER', 'postgres'); /** MySQL database password */ define('DB_PASSWORD', 'postgres'); /** MySQL hostname */ define('DB_HOST', 'localhost');
Dans le navigateur : … wordpress/wp-admin/install.php
→ l installation des tables se fait dans le schéma public (pas de schéma différent)