Wordpress » Historie » Version 3
Jeremias Keihsler, 13.01.2017 18:32
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 | 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 | 3 | Jeremias Keihsler | |
90 | 1 | Jeremias Keihsler | * Backup database, refer to appropriate section. |
91 | * login to http://example.com/wp-admin and **deactivate all plugins** |
||
92 | * logout admin-dashboard |
||
93 | * delete old @wp-includes@ and @wp-admin@ directories |
||
94 | |||
95 | <pre><code class="bash"> |
||
96 | cd /var/www/html/example.com/wp-includes |
||
97 | /bin/rm -r * |
||
98 | cd / |
||
99 | rmdir /var/www/html/example.com/wp-includes |
||
100 | cd /var/www/html/example.com/wp-admin |
||
101 | /bin/rm -r * |
||
102 | cd / |
||
103 | rmdir /var/www/html/example.com/wp-admin |
||
104 | </code></pre> |
||
105 | 3 | Jeremias Keihsler | |
106 | 1 | Jeremias Keihsler | * copy new @wp-includes@ and @wp-admin@ directories in place |
107 | |||
108 | <pre><code class="bash"> |
||
109 | cp -r /usr/share/wordpress/wp-includes /var/www/html/example.com |
||
110 | chown -R apache:apache /var/www/html/example.com/wp-includes |
||
111 | cp -r /usr/share/wordpress/wp-admin /var/www/html/example.com |
||
112 | chown -R apache:apache /var/www/html/example.com/wp-admin |
||
113 | </code></pre> |
||
114 | 3 | Jeremias Keihsler | |
115 | 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). |
116 | |||
117 | <pre><code class="bash"> |
||
118 | rsync --verbose --progress --stats --partial --recursive /usr/share/wordpress/wp-content/* /var/www/html/example.com/wp-content/. |
||
119 | chown -R apache:apache /var/www/html/example.com/wp-content |
||
120 | </code></pre> |
||
121 | 3 | Jeremias Keihsler | |
122 | 1 | Jeremias Keihsler | * Upload all new loose files from the root directory of the new version to your existing wordpress root directory. |
123 | |||
124 | <pre><code class="bash"> |
||
125 | rsync --verbose --progress --stats --partial --exclude "wp-config.php" /usr/share/wordpress/* /var/www/html/example.com/. |
||
126 | chown apache:apache /var/www/html/example.com/* |
||
127 | </code></pre> |
||
128 | 3 | Jeremias Keihsler | |
129 | 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. |
130 | * login to http://example.com/wp-admin and **reactivate necessary plugins** |
||
131 | |||
132 | h1. Troubleshooting |
||
133 | |||
134 | This site has some really useful information |
||
135 | * http://codex.wordpress.org/User:Sivel/FAQ |