Difference between revisions of "Wordpress"
(→Installeer website) |
(→multi site) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
mysql> create database webhuis_nl; |
mysql> create database webhuis_nl; |
||
mysql> grant all on webhuis_nl.* to gebruker identified by "geheim"; |
mysql> grant all on webhuis_nl.* to gebruker identified by "geheim"; |
||
− | mysql> grant all on |
+ | mysql> grant all on webhuis_nl.* to gebruiker@localhost identified by "geheim"; |
mysql> flush privileges; |
mysql> flush privileges; |
||
</pre> |
</pre> |
||
Line 24: | Line 24: | ||
* http://sharealike.org/index.php/2007/04/07/multiple-wordpress-blogs-on-a-debian-server/ |
* http://sharealike.org/index.php/2007/04/07/multiple-wordpress-blogs-on-a-debian-server/ |
||
* http://linux.justinhartman.com/Wordpress_Installation_on_Debian |
* http://linux.justinhartman.com/Wordpress_Installation_on_Debian |
||
+ | == multi site == |
||
+ | Multi site vereist per een aantal instellingen om het geheel werkend te krijgen. Doe je dat niet dan gaan alle sites op wit. |
||
+ | Add the following to your /etc/wordpress/config-domain.nl.php file: |
||
+ | <pre> |
||
+ | define('MULTISITE', true); |
||
+ | define('SUBDOMAIN_INSTALL', true); |
||
+ | define('DOMAIN_CURRENT_SITE', 'test.domain.nl'); |
||
+ | define('PATH_CURRENT_SITE', '/'); |
||
+ | define('SITE_ID_CURRENT_SITE', 1); |
||
+ | define('BLOG_ID_CURRENT_SITE', 1); |
||
+ | </pre> |
||
+ | These unique authentication keys are also missing from your /etc/wordpress/config-zevendehemel.nl.php file. To make your installation more secure, you should also add: |
||
+ | <pre> |
||
+ | define( 'AUTH_KEY', '****************************' ); |
||
+ | define( 'SECURE_AUTH_KEY', ''****************************'' ); |
||
+ | define( 'LOGGED_IN_KEY', ''****************************'' ); |
||
+ | define( 'NONCE_KEY', ''****************************'' ); |
||
+ | define( 'AUTH_SALT', ''****************************'' ); |
||
+ | define( 'SECURE_AUTH_SALT', ''****************************'' ); |
||
+ | define( 'LOGGED_IN_SALT', ''****************************'' ); |
||
+ | define( 'NONCE_SALT', ''****************************'' ); |
||
+ | </pre> |
||
+ | |||
+ | Add the following to your /etc/wordpress/htaccess file, replacing other WordPress rules: |
||
+ | <pre> |
||
+ | RewriteEngine On |
||
+ | RewriteBase / |
||
+ | RewriteRule ^index\.php$ - [L] |
||
+ | |||
+ | # add a trailing slash to /wp-admin |
||
+ | |||
+ | RewriteRule ^wp-admin$ wp-admin/ [R=301,L] |
||
+ | |||
+ | RewriteCond %{REQUEST_FILENAME} -f [OR] |
||
+ | RewriteCond %{REQUEST_FILENAME} -d |
||
+ | RewriteRule ^ - [L] |
||
+ | RewriteRule ^(wp-(content|admin|includes).*) $1 [L] |
||
+ | RewriteRule ^(.*\.php)$ $1 [L] |
||
+ | RewriteRule . index.php [L] |
||
+ | </pre> |
||
+ | == /etc/wordpress/htaccess == |
||
+ | ## |
||
+ | ## Configuration for a multi-site wordpress installation using subdomains |
||
+ | ## |
||
+ | <IfModule mod_rewrite.c> |
||
+ | RewriteEngine On |
||
+ | RewriteBase / |
||
+ | RewriteRule ^index\.php$ - [L] |
||
+ | |||
+ | # add a trailing slash to /wp-admin |
||
+ | RewriteRule ^wp-admin$ wp-admin/ [R=301,L] |
||
+ | |||
+ | RewriteCond %{REQUEST_FILENAME} -f [OR] |
||
+ | RewriteCond %{REQUEST_FILENAME} -d |
||
+ | RewriteRule ^ - [L] |
||
+ | RewriteRule ^(wp-(content|admin|includes).*) $1 [L] |
||
+ | RewriteRule ^(.*\.php)$ $1 [L] |
||
+ | RewriteRule . index.php [L] |
||
+ | </IfModule> |
||
= Install = |
= Install = |
Latest revision as of 15:12, 16 March 2013
Installeer website
Op de server is de benodige code van Wordpress aanwezig in /usr/share/wordpress.
Eerst de database voorbereiden:
Er is reeds een lege database aangemaakt met de volgende rechten: mysql> create database webhuis_nl; mysql> grant all on webhuis_nl.* to gebruker identified by "geheim"; mysql> grant all on webhuis_nl.* to gebruiker@localhost identified by "geheim"; mysql> flush privileges;
Daarna de voorbereiding van de webserver:
root@host:~# vi /etc/apache2/sites-available/test2.webhuis.nl.conf root@host:~# mkdir /var/www/webhuis.nl root@host:~# a2ensite -> enable test2.webhuis.nl root@host:~# /etc/init.d/apache2 reload
Als laatste volgt de wordpress code voor de website.
root@host:~# cp -a /usr/share/wordpress/* /var/www/webhuis.nl/
- http://www.howtoforge.com/running-wordpress-on-nginx-lemp-on-debian-squeeze-ubuntu-11.04
- http://codex.wordpress.org/User:Sivel/FAQ
- http://sharealike.org/index.php/2007/04/07/multiple-wordpress-blogs-on-a-debian-server/
- http://linux.justinhartman.com/Wordpress_Installation_on_Debian
multi site
Multi site vereist per een aantal instellingen om het geheel werkend te krijgen. Doe je dat niet dan gaan alle sites op wit. Add the following to your /etc/wordpress/config-domain.nl.php file:
define('MULTISITE', true); define('SUBDOMAIN_INSTALL', true); define('DOMAIN_CURRENT_SITE', 'test.domain.nl'); define('PATH_CURRENT_SITE', '/'); define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1);
These unique authentication keys are also missing from your /etc/wordpress/config-zevendehemel.nl.php file. To make your installation more secure, you should also add:
define( 'AUTH_KEY', '****************************' ); define( 'SECURE_AUTH_KEY', ''****************************'' ); define( 'LOGGED_IN_KEY', ''****************************'' ); define( 'NONCE_KEY', ''****************************'' ); define( 'AUTH_SALT', ''****************************'' ); define( 'SECURE_AUTH_SALT', ''****************************'' ); define( 'LOGGED_IN_SALT', ''****************************'' ); define( 'NONCE_SALT', ''****************************'' );
Add the following to your /etc/wordpress/htaccess file, replacing other WordPress rules:
RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^(wp-(content|admin|includes).*) $1 [L] RewriteRule ^(.*\.php)$ $1 [L] RewriteRule . index.php [L]
/etc/wordpress/htaccess
- Configuration for a multi-site wordpress installation using subdomains
<IfModule mod_rewrite.c>
RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^(wp-(content|admin|includes).*) $1 [L] RewriteRule ^(.*\.php)$ $1 [L] RewriteRule . index.php [L]
</IfModule>
Install
Voer op een kale server het volgende commando uit:
root@twhz-210:~# apt-get install wordpress mysql-server
Dit commando installeert alles inclusief apache, mysql, php en modules.
Terug naar: Webhuis Infrastructuur