WordPress
From KevinWiki
(Difference between revisions)
m (New page: Category:Weblog_Software == WordPress == WordPress is Weblog Software written using PHP. It uses MySQL database for ...) |
|||
(3 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
[[Category:Weblog_Software]] | [[Category:Weblog_Software]] | ||
== WordPress == | == WordPress == | ||
- | WordPress is [[wikipedia:Weblog_software|Weblog Software]] written using [[wikipedia:PHP|PHP]]. It uses [[wikipedia:MySQL|MySQL]] database for storing data. | + | [http://wordpress.org WordPress] is [[wikipedia:Weblog_software|Weblog Software]] written using [[wikipedia:PHP|PHP]]. It uses [[wikipedia:MySQL|MySQL]] database for storing data. |
== Installation == | == Installation == | ||
This instruction is for Ubuntu Linux 8.04 (possibly other versions). | This instruction is for Ubuntu Linux 8.04 (possibly other versions). | ||
+ | |||
+ | * Also install | ||
+ | $ sudo apt-get install php5-mysql php-pear | ||
=== Prerequisite === | === Prerequisite === | ||
Line 11: | Line 14: | ||
=== Database Setup === | === Database Setup === | ||
<source lang="sql"> | <source lang="sql"> | ||
- | CREATE DATABASE databasename; | + | CREATE DATABASE databasename; |
- | GRANT ALL PRIVILEGES ON databasename.* TO | + | GRANT ALL PRIVILEGES ON `databasename`.* TO `username`@`hostname` IDENTIFIED BY 'password'; |
- | FLUSH PRIVILEGES; | + | FLUSH PRIVILEGES; |
</source> | </source> | ||
+ | |||
+ | |||
+ | == Nginx == | ||
+ | site file | ||
+ | <pre> | ||
+ | server { | ||
+ | listen 443; | ||
+ | listen 127.0.0.1:443; | ||
+ | server_name blog.localhost; | ||
+ | root /var/www/blog; | ||
+ | index index.php index.html index.htm; | ||
+ | |||
+ | ssl on; | ||
+ | ssl_certificate /etc/ssl/certs/server.crt; | ||
+ | ssl_certificate_key /etc/ssl/private/server.key; | ||
+ | |||
+ | location / { | ||
+ | index index.php index.html index.htm; | ||
+ | } | ||
+ | |||
+ | location ~ \.php$ { | ||
+ | try_files $uri =404; | ||
+ | fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||
+ | fastcgi_pass 127.0.0.1:9000; | ||
+ | fastcgi_index index.php; | ||
+ | include fastcgi_params; | ||
+ | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
+ | fastcgi_param SERVER_NAME $host; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | server { | ||
+ | listen 80; | ||
+ | listen 127.0.0.1:80; | ||
+ | server_name blog.localhost; | ||
+ | root /var/www/blog; | ||
+ | index index.php index.html index.htm; | ||
+ | |||
+ | location / { | ||
+ | index index.php index.html index.htm; | ||
+ | } | ||
+ | |||
+ | location ~ \.php$ { | ||
+ | try_files $uri =404; | ||
+ | fastcgi_split_path_info ^(.+\.php)(/.+)$; | ||
+ | fastcgi_pass 127.0.0.1:9000; | ||
+ | fastcgi_index index.php; | ||
+ | include fastcgi_params; | ||
+ | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
+ | fastcgi_param SERVER_NAME $host; | ||
+ | } | ||
+ | } | ||
+ | </pre> |
Latest revision as of 10:48, 31 December 2012
Contents |
WordPress
WordPress is Weblog Software written using PHP. It uses MySQL database for storing data.
Installation
This instruction is for Ubuntu Linux 8.04 (possibly other versions).
- Also install
$ sudo apt-get install php5-mysql php-pear
Prerequisite
It requires installing Apache, PHP and MySQL (APM). Thus these must be installed before installing WordPress. The installation instruction can be found from APM.
Database Setup
CREATE DATABASE databasename; GRANT ALL PRIVILEGES ON `databasename`.* TO `username`@`hostname` IDENTIFIED BY 'password'; FLUSH PRIVILEGES;
Nginx
site file
server { listen 443; listen 127.0.0.1:443; server_name blog.localhost; root /var/www/blog; index index.php index.html index.htm; ssl on; ssl_certificate /etc/ssl/certs/server.crt; ssl_certificate_key /etc/ssl/private/server.key; location / { index index.php index.html index.htm; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SERVER_NAME $host; } } server { listen 80; listen 127.0.0.1:80; server_name blog.localhost; root /var/www/blog; index index.php index.html index.htm; location / { index index.php index.html index.htm; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SERVER_NAME $host; } }