 |
|
| |
| Introduction
| |
WordPress is the most widely
used content-management system on the web — the software behind a large share of all sites, from
personal blogs to business sites and, with the WooCommerce plugin, full online stores. It is a PHP
application backed by a MariaDB
database, so on a GSP VPS you install it on top of the same building blocks covered elsewhere in this
documentation: Apache,
PHP, and a database.
This page shows the path from a bare virtual host to a running WordPress site. Work through
Web Applications first if PHP
and a database are not yet installed.
| |
| Prepare the Database
| |
WordPress needs a database and a dedicated user. Following the
MariaDB page, connect as the
database root and create them:
CREATE DATABASE wordpress;
CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'choose-a-strong-password';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost';
FLUSH PRIVILEGES;
Make sure PHP has the extensions WordPress expects — at minimum the MySQL driver, plus
gd, mbstring, xml, curl, and zip. These are listed on the
Web Applications page
(php84-mysqli … on FreeBSD, php-mysqlnd … on Rocky Linux).
| |
| Install the Files
| |
Download the latest WordPress into your site's document root and set ownership so the web server can
read the files. Use the document root from your
virtual host — the paths
below follow the examples used throughout this documentation:
On FreeBSD 15 (Apache runs as the www user):
$ cd ~/public_html
$ fetch https://wordpress.org/latest.tar.gz
$ tar xzf latest.tar.gz --strip-components=1 && rm latest.tar.gz
# chown -R youruser:www ~/public_html
On Rocky Linux 10 (Apache runs as the apache user):
$ cd ~/public_html
$ curl -O https://wordpress.org/latest.tar.gz
$ tar xzf latest.tar.gz --strip-components=1 && rm latest.tar.gz
# chown -R youruser:apache ~/public_html
|
NOTE (Rocky Linux / SELinux): WordPress needs to write to parts of its own
directory (uploads, updates, plugins). Give those the read-write web label so SELinux
permits it:
# semanage fcontext -a -t httpd_sys_rw_content_t "/home/youruser/public_html(/.*)?"
# restorecon -Rv /home/youruser/public_html
# setsebool -P httpd_can_network_connect_db on
See Web Applications
for more on file ownership, the execute bit, and SELinux contexts.
|
| |
| Run the Installer
| |
Copy the sample configuration and fill in the database name, user, and password you created:
$ cd ~/public_html
$ cp wp-config-sample.php wp-config.php
$ nano wp-config.php # set DB_NAME, DB_USER, DB_PASSWORD
While editing wp-config.php, paste fresh "secret keys" from
WordPress's salt
generator over the placeholder lines. Then visit your site in a browser
(https://your-domain.example/) and complete the famous "five-minute install": choose a site
title, and create your administrator account with a strong password.
| |
| Secure and Maintain the Site
| |
A public WordPress site is a popular target, so a few habits matter more here than almost anywhere
else:
Serve it over HTTPS. Obtain a free certificate as on the
HTTPS and SSL page and set your
site URL to the https:// address — required for secure logins and for e-commerce.
Keep everything updated. WordPress core, themes, and plugins all receive security
fixes; apply them promptly (WordPress can do much of this automatically). Install only plugins and
themes you need, from reputable sources.
Protect the login. Use a strong administrator password and consider limiting access to
wp-login.php / wp-admin — the password-protected-directory and
fail2ban techniques in this
documentation both apply.
Back up files and database together. Follow the
Server Maintenance
routine so a bad update or compromise is recoverable.
To sell online, the WooCommerce
plugin turns WordPress into a store — see the
E-Commerce page.
| |
| Documentation
| |
WordPress is an application that runs on top of your VPS; for anything specific to it, the project's
own documentation and community are the best first stop:
|
Toll Free 1-866-GSP-4400 • 1-301-464-9363 • service@gsp.com
Copyright © 1994-2026 GSP Services, Inc.
|