Projekt

Allgemein

Profil

Wordpress » Historie » Version 1

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