WordPress
WordPress is web software you can use to create a beautiful website or blog. For Wordpress a bunch of plugins are available.
Contents |
Install lighttpd, PHP, and MySql
Install the additional packages:
apk add lighttpd php-common php-iconv php-json php-gd php-curl php-xml php-pgsql php-imap
apk add php-pdo php-pdo_pgsql php-soap php-xmlrpc php-posix php-mcrypt php-gettext php-ldap php-ctype php-dom
Configure Lighttpd
vi /etc/lighttpd/lighttpd.conf
Uncomment line:
include "mod_fastcgi.conf"
Start lighttpd service and add to needed runlevel
/etc/init.d/lighttpd start && rc-update add lighttpd default
Install extra packages:
apk add php-mysql mysql mysql-client php-zlib
Installing and configuring WordPress
Create a directory named webapps
mkdir -p /usr/share/webapps/
Download the latest Wordpress source files
cd /usr/share/webapps/ wget http://wordpress.org/latest.tar.gz
Unpack the archive and delete it afterwards
tar -xzvf latest.tar.gz rm latest.tar.gz
Change the folder persmissions
chown -R lighttpd /usr/share/webapps/
Create a symlink to the wordpress folder
ln -s /usr/share/webapps/wordpress/ /var/www/localhost/htdocs/wordpress
Config and start MySql
/usr/bin/mysql_install_db --user=mysql /etc/init.d/mysql start && rc-update add mysql default /usr/bin/mysqladmin -u root password 'password'
Create the WordPress database
mysql -u root -p
CREATE DATABASE wordpress; GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY 'wordpress password'; FLUSH PRIVILEGES; EXIT
Config your WordPress
Browse to http://WEBSERVER_IP_ADDRESS/wordpress/
- Click on: "Create a Configuration File"
- Click on: "Let’s go!"
- Database Name: wordpress
- User Name: wordpress
- Password: <wordpress password>
- Database Host: localhost
- Table Prefix: wp_
You may need create the wp-config.php manually, so modify define the 'DB_NAME', DB_USER and DB_PASSWORD, then copy and paste the text into it. After you've done that, click "Run the install."
- Enter Information as needed
- Site Title
- Username
- Password, twice
- Your E-mail
After you've done that, click "Install WordPress"
You have WordPress working, to access go to http://WEBSERVER_IP_ADDRESS/wordpress and enjoy!