Wordpress » Historie » Revision 3
Revision 2 (Jeremias Keihsler, 13.01.2017 18:31) → Revision 3/4 (Jeremias Keihsler, 13.01.2017 18:32)
h1. Install h2. Install Repository [[dw_os_cos6:repo_epel|Install epel repository]] h2. Install Package <pre><code class="bash"> yum install wordpress </code></pre> h1. Basic Setup best is to follow http://codex.wordpress.org/Installing_WordPress h2. create MySQL-DB <pre><code class="sql"> $ mysql -u adminusername -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5340 to server version: 3.23.54 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> CREATE DATABASE databasename; Query OK, 1 row affected (0.00 sec) mysql> GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"hostname" IDENTIFIED BY "password"; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.01 sec) mysql> EXIT Bye $ </code></pre> * open @http://example.com/wordpress@ * enter username/password for @ADMIN@ h1. Wordpress Farm after some discussion and testing following set-up was chosen: * Wordpress is just a bunch of PHP-scripts. Copy all files from @usr/share/wordpress/@ over to the root-folder of the site * set-up each site individually each one with a separate MySQL-DB h1. SSL secured web-server see also http://wiki.centos.org/HowTos/Https h1. configure outgoing mail WordPress does not send mail via SMTP out of the box. Following Plugin is working with Wordpress 3.5.1 @Configure SMTP@ http://wordpress.org/extend/plugins/configure-smtp/installation/ h1. Backup/Restore h2. Backup DB h3. MySQL h2. Backup Files h2. Restore DB h3. MySQL <pre><code class="bash"> mysql -u<user> -p < db_backup.dump </code></pre> h1. Update While updating Plugins and Themes can be done via the Admin-Panel the wordpress-core needs to be updated on our machines manually. this is basically taken from http://codex.wordpress.org/Upgrading_WordPress * Backup all files and settings <pre><code class="bash"> cd /var/www/html/ tar -pcvzf example.com.yyyymmdd.tar.gz ./example.com chown root:root example.com.yyyymmdd.tar.gz chmod 600 example.com.yyyy.tar.gz </code></pre> * Backup database, refer to appropriate section. * login to http://example.com/wp-admin and **deactivate all plugins** * logout admin-dashboard * delete old @wp-includes@ and @wp-admin@ directories <pre><code class="bash"> cd /var/www/html/example.com/wp-includes /bin/rm -r * cd / rmdir /var/www/html/example.com/wp-includes cd /var/www/html/example.com/wp-admin /bin/rm -r * cd / rmdir /var/www/html/example.com/wp-admin </code></pre> * copy new @wp-includes@ and @wp-admin@ directories in place <pre><code class="bash"> cp -r /usr/share/wordpress/wp-includes /var/www/html/example.com chown -R apache:apache /var/www/html/example.com/wp-includes cp -r /usr/share/wordpress/wp-admin /var/www/html/example.com chown -R apache:apache /var/www/html/example.com/wp-admin </code></pre> * Upload the individual files from the new @wp-content@ folder to your existing @wp-content@ folder, overwriting existing files. Do *NOT* delete your existing @wp-content@ folder. Do *NOT* delete any files or folders in your existing @wp-content@ directory (except for the one being overwritten by new files). <pre><code class="bash"> rsync --verbose --progress --stats --partial --recursive /usr/share/wordpress/wp-content/* /var/www/html/example.com/wp-content/. chown -R apache:apache /var/www/html/example.com/wp-content </code></pre> * Upload all new loose files from the root directory of the new version to your existing wordpress root directory. <pre><code class="bash"> rsync --verbose --progress --stats --partial --exclude "wp-config.php" /usr/share/wordpress/* /var/www/html/example.com/. chown apache:apache /var/www/html/example.com/* </code></pre> * Visit your main WordPress admin page at @/wp-admin@. You may be asked to login again. If a database upgrade is necessary at this point, WordPress will detect it and give you a link to a URL like @http://example.com/wordpress/wp-admin/upgrade.php@. Follow that link and follow the instructions. This will update your database to be compatible with the latest code. You should do this as soon as possible. * login to http://example.com/wp-admin and **reactivate necessary plugins** h1. Troubleshooting This site has some really useful information * http://codex.wordpress.org/User:Sivel/FAQ