Wordpress » Historie » Version 4
Jeremias Keihsler, 13.01.2017 18:34
| 1 | 1 | Jeremias Keihsler | h1. Install |
|---|---|---|---|
| 2 | |||
| 3 | h2. Install Repository |
||
| 4 | |||
| 5 | [[dw_os_cos6:repo_epel|Install epel repository]] |
||
| 6 | 2 | Jeremias Keihsler | |
| 7 | 1 | Jeremias Keihsler | h2. Install Package |
| 8 | |||
| 9 | <pre><code class="bash"> |
||
| 10 | yum install wordpress |
||
| 11 | </code></pre> |
||
| 12 | |||
| 13 | h1. Basic Setup |
||
| 14 | |||
| 15 | best is to follow http://codex.wordpress.org/Installing_WordPress |
||
| 16 | |||
| 17 | h2. create MySQL-DB |
||
| 18 | |||
| 19 | <pre><code class="sql"> |
||
| 20 | $ mysql -u adminusername -p |
||
| 21 | Enter password: |
||
| 22 | Welcome to the MySQL monitor. Commands end with ; or \g. |
||
| 23 | Your MySQL connection id is 5340 to server version: 3.23.54 |
||
| 24 | |||
| 25 | Type 'help;' or '\h' for help. Type '\c' to clear the buffer. |
||
| 26 | |||
| 27 | mysql> CREATE DATABASE databasename; |
||
| 28 | Query OK, 1 row affected (0.00 sec) |
||
| 29 | |||
| 30 | mysql> GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"hostname" IDENTIFIED BY "password"; |
||
| 31 | Query OK, 0 rows affected (0.00 sec) |
||
| 32 | |||
| 33 | mysql> FLUSH PRIVILEGES; |
||
| 34 | Query OK, 0 rows affected (0.01 sec) |
||
| 35 | |||
| 36 | mysql> EXIT |
||
| 37 | Bye |
||
| 38 | $ |
||
| 39 | </code></pre> |
||
| 40 | |||
| 41 | * open @http://example.com/wordpress@ |
||
| 42 | * enter username/password for @ADMIN@ |
||
| 43 | |||
| 44 | h1. Wordpress Farm |
||
| 45 | |||
| 46 | after some discussion and testing following set-up was chosen: |
||
| 47 | * Wordpress is just a bunch of PHP-scripts. Copy all files from @usr/share/wordpress/@ over to the root-folder of the site |
||
| 48 | * set-up each site individually each one with a separate MySQL-DB |
||
| 49 | 3 | Jeremias Keihsler | |
| 50 | 1 | Jeremias Keihsler | h1. SSL secured web-server |
| 51 | |||
| 52 | see also http://wiki.centos.org/HowTos/Https |
||
| 53 | |||
| 54 | h1. configure outgoing mail |
||
| 55 | |||
| 56 | WordPress does not send mail via SMTP out of the box. Following Plugin is working with Wordpress 3.5.1 @Configure SMTP@ |
||
| 57 | |||
| 58 | http://wordpress.org/extend/plugins/configure-smtp/installation/ |
||
| 59 | |||
| 60 | h1. Backup/Restore |
||
| 61 | |||
| 62 | h3. MySQL |
||
| 63 | |||
| 64 | 4 | Jeremias Keihsler | [[dw_dr:MariaDB55|MariaDB 5.5 Disaster Recovery]] |
| 65 | 1 | Jeremias Keihsler | |
| 66 | |||
| 67 | |||
| 68 | h1. Update |
||
| 69 | |||
| 70 | While updating Plugins and Themes can be done via the Admin-Panel the wordpress-core needs to be updated on our machines manually. |
||
| 71 | |||
| 72 | this is basically taken from http://codex.wordpress.org/Upgrading_WordPress |
||
| 73 | * Backup all files and settings |
||
| 74 | |||
| 75 | <pre><code class="bash"> |
||
| 76 | cd /var/www/html/ |
||
| 77 | tar -pcvzf example.com.yyyymmdd.tar.gz ./example.com |
||
| 78 | chown root:root example.com.yyyymmdd.tar.gz |
||
| 79 | chmod 600 example.com.yyyy.tar.gz |
||
| 80 | </code></pre> |
||
| 81 | 3 | Jeremias Keihsler | |
| 82 | 1 | Jeremias Keihsler | * Backup database, refer to appropriate section. |
| 83 | * login to http://example.com/wp-admin and **deactivate all plugins** |
||
| 84 | * logout admin-dashboard |
||
| 85 | * delete old @wp-includes@ and @wp-admin@ directories |
||
| 86 | |||
| 87 | <pre><code class="bash"> |
||
| 88 | cd /var/www/html/example.com/wp-includes |
||
| 89 | /bin/rm -r * |
||
| 90 | cd / |
||
| 91 | rmdir /var/www/html/example.com/wp-includes |
||
| 92 | cd /var/www/html/example.com/wp-admin |
||
| 93 | /bin/rm -r * |
||
| 94 | cd / |
||
| 95 | rmdir /var/www/html/example.com/wp-admin |
||
| 96 | </code></pre> |
||
| 97 | 3 | Jeremias Keihsler | |
| 98 | 1 | Jeremias Keihsler | * copy new @wp-includes@ and @wp-admin@ directories in place |
| 99 | |||
| 100 | <pre><code class="bash"> |
||
| 101 | cp -r /usr/share/wordpress/wp-includes /var/www/html/example.com |
||
| 102 | chown -R apache:apache /var/www/html/example.com/wp-includes |
||
| 103 | cp -r /usr/share/wordpress/wp-admin /var/www/html/example.com |
||
| 104 | chown -R apache:apache /var/www/html/example.com/wp-admin |
||
| 105 | </code></pre> |
||
| 106 | 3 | Jeremias Keihsler | |
| 107 | 1 | Jeremias Keihsler | * 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). |
| 108 | |||
| 109 | <pre><code class="bash"> |
||
| 110 | rsync --verbose --progress --stats --partial --recursive /usr/share/wordpress/wp-content/* /var/www/html/example.com/wp-content/. |
||
| 111 | chown -R apache:apache /var/www/html/example.com/wp-content |
||
| 112 | </code></pre> |
||
| 113 | 3 | Jeremias Keihsler | |
| 114 | 1 | Jeremias Keihsler | * Upload all new loose files from the root directory of the new version to your existing wordpress root directory. |
| 115 | |||
| 116 | <pre><code class="bash"> |
||
| 117 | rsync --verbose --progress --stats --partial --exclude "wp-config.php" /usr/share/wordpress/* /var/www/html/example.com/. |
||
| 118 | chown apache:apache /var/www/html/example.com/* |
||
| 119 | </code></pre> |
||
| 120 | 3 | Jeremias Keihsler | |
| 121 | 1 | Jeremias Keihsler | * 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. |
| 122 | * login to http://example.com/wp-admin and **reactivate necessary plugins** |
||
| 123 | |||
| 124 | h1. Troubleshooting |
||
| 125 | |||
| 126 | This site has some really useful information |
||
| 127 | * http://codex.wordpress.org/User:Sivel/FAQ |