Wordpress » Historie » Version 2
Jeremias Keihsler, 13.01.2017 18:31
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 | h1. SSL secured web-server |
||
50 | |||
51 | see also http://wiki.centos.org/HowTos/Https |
||
52 | |||
53 | h1. configure outgoing mail |
||
54 | |||
55 | WordPress does not send mail via SMTP out of the box. Following Plugin is working with Wordpress 3.5.1 @Configure SMTP@ |
||
56 | |||
57 | http://wordpress.org/extend/plugins/configure-smtp/installation/ |
||
58 | |||
59 | h1. Backup/Restore |
||
60 | |||
61 | |||
62 | h2. Backup DB |
||
63 | |||
64 | h3. MySQL |
||
65 | |||
66 | h2. Backup Files |
||
67 | |||
68 | h2. Restore DB |
||
69 | |||
70 | h3. MySQL |
||
71 | |||
72 | <pre><code class="bash"> |
||
73 | mysql -u<user> -p < db_backup.dump |
||
74 | </code></pre> |
||
75 | |||
76 | h1. Update |
||
77 | |||
78 | While updating Plugins and Themes can be done via the Admin-Panel the wordpress-core needs to be updated on our machines manually. |
||
79 | |||
80 | this is basically taken from http://codex.wordpress.org/Upgrading_WordPress |
||
81 | * Backup all files and settings |
||
82 | |||
83 | <pre><code class="bash"> |
||
84 | cd /var/www/html/ |
||
85 | tar -pcvzf example.com.yyyymmdd.tar.gz ./example.com |
||
86 | chown root:root example.com.yyyymmdd.tar.gz |
||
87 | chmod 600 example.com.yyyy.tar.gz |
||
88 | </code></pre> |
||
89 | * Backup database, refer to appropriate section. |
||
90 | * login to http://example.com/wp-admin and **deactivate all plugins** |
||
91 | * logout admin-dashboard |
||
92 | * delete old @wp-includes@ and @wp-admin@ directories |
||
93 | |||
94 | <pre><code class="bash"> |
||
95 | cd /var/www/html/example.com/wp-includes |
||
96 | /bin/rm -r * |
||
97 | cd / |
||
98 | rmdir /var/www/html/example.com/wp-includes |
||
99 | cd /var/www/html/example.com/wp-admin |
||
100 | /bin/rm -r * |
||
101 | cd / |
||
102 | rmdir /var/www/html/example.com/wp-admin |
||
103 | </code></pre> |
||
104 | * copy new @wp-includes@ and @wp-admin@ directories in place |
||
105 | |||
106 | <pre><code class="bash"> |
||
107 | cp -r /usr/share/wordpress/wp-includes /var/www/html/example.com |
||
108 | chown -R apache:apache /var/www/html/example.com/wp-includes |
||
109 | cp -r /usr/share/wordpress/wp-admin /var/www/html/example.com |
||
110 | chown -R apache:apache /var/www/html/example.com/wp-admin |
||
111 | </code></pre> |
||
112 | * 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). |
||
113 | |||
114 | <pre><code class="bash"> |
||
115 | rsync --verbose --progress --stats --partial --recursive /usr/share/wordpress/wp-content/* /var/www/html/example.com/wp-content/. |
||
116 | chown -R apache:apache /var/www/html/example.com/wp-content |
||
117 | </code></pre> |
||
118 | * Upload all new loose files from the root directory of the new version to your existing wordpress root directory. |
||
119 | |||
120 | <pre><code class="bash"> |
||
121 | rsync --verbose --progress --stats --partial --exclude "wp-config.php" /usr/share/wordpress/* /var/www/html/example.com/. |
||
122 | chown apache:apache /var/www/html/example.com/* |
||
123 | </code></pre> |
||
124 | * 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. |
||
125 | * login to http://example.com/wp-admin and **reactivate necessary plugins** |
||
126 | |||
127 | h1. Troubleshooting |
||
128 | |||
129 | This site has some really useful information |
||
130 | * http://codex.wordpress.org/User:Sivel/FAQ |