• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Saturday, May 10, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System BSD

Install WordPress on OpenBSD 6.2

How VPS by How VPS
September 1, 2019
in BSD
0
0
SHARES
24
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Introduction
  2. Housekeeping
  3. Installation
  4. Want to contribute?


Introduction

WordPress is the dominant content management system on the internet. It powers everything from blogs to complex websites with dynamic content. This tutorial will discuss getting WordPress up and running on OpenBSD 6.2.

Before we begin, there are some small housekeeping items that need to be taken care of in order for WordPress to function correctly. Please do not skip these steps, because if you do, you will get some very generic errors that are next to impossible to decipher. Remember that OpenBSD’s internal httpd server runs in a chroot environment and these housekeeping steps account for this.

Housekeeping

Create the directory /var/www/etc and keep the default permissions.

Create a new file called hosts and add the following entries. This will allow WordPress to download updates, themes, and plugins.

127.0.0.1       localhost
66.155.40.202 api.wordpress.org
66.155.40.186 downloads.wordpress.org
66.155.40.187 downloads.wordpress.org
66.155.40.188 downloads.wordpress.org

Install some prerequisite packages.

pkg_install php-5.6 php-fastcgi php-curl php-mysql php-zip mariadb-server mariadb-client
pkg_install wget unzip 

Copy the sample ini files from /etc/php-5.6.sample to /etc/php-5.6/.

Create an /etc/httpd.conf file similar to the one below. You can optionally replace the server name "default" with the actual name in DNS, but that is not strictly necessary.

types { include "/usr/share/misc/mime.types" }

server "default" {
    listen on egress port 80
    root "/wordpress"
    directory index index.php

    location "*.php*" {
            fastcgi socket "/run/php-fpm.sock"
    }
}

Now it is time to enable the necessary daemons so they launch at system startup.

rcctl enable php56_fpm 
rcctl enable httpd
rcctl enable mysqld

Installation

Download WordPress, then move it into /var/www and set the correct permissions.

cd /tmp
wget https://wordpress.org/latest.zip
unzip latest.zip
mv wordpress /var/www/.
chown -R www:www /var/www/wordpress/

Setup MariaDB to provide the database for WordPress. Running mysql_secure_installation is recommended because it can remove anonymous users and the test database. Furthermore, a root password for MariaDB is set.

mysql_install_db
rcctl start mysqld
mysql_secure_installation

Create the WordPress database. Make certain to replace Password with the password that you intend to use.

mysql -u root -p <password goes here>
CREATE DATABASE wordpress;
CREATE USER 'wordpress'@'localhost' identified by 'Password';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost' IDENTIFIED BY 'Password'; 
FLUSH PRIVILEGES;
EXIT;

Now that you have created the WordPress database, it is time to start the web server and the fastcgi daemon.

rcctl start httpd
rcctl start php56_fpm

From here, open up a web browser and browse to your website, e.g. www.example.org. You will see the WordPress Installation Wizard. On the next screen, you will be prompted for the database name, database username, database password, server, and the table prefix.

The database name defaults to “wordpress“. Make certain to set the database user to “wordpress” and use the same password as when you created the database previously. Finally, change the server to 127.0.0.1 and leave the table prefix as-is.

The wizard should properly populate the database and then prompt you to create an “admin” user. Once this is completed, you are ready to download themes and plugins and begin your website design. On a closing note, be sure to keep an eye on new versions and keep your WordPress install up to date. The further you get away from the current version, the harder upgrades tend to be.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

Resize ZFS Storage Pool on FreeBSD/TrueOS

Next Post

How to Install Subrion 4.1 CMS on a FreeBSD 11 FAMP VPS

Next Post

How to Install Subrion 4.1 CMS on a FreeBSD 11 FAMP VPS

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet