WordPress
Download phpMyAdmin Code
Download the current version of WordPress code with:
user@freebsdsrv:~ $ fetch https://wordpress.org/latest.tar.gz [enter]
latest.tar.gz 25 MB 9 MBps 03s
user@freebsdsrv:~ $
Extract the WordPress code
user@freebsdsrv:~ $ sudo tar zxvf latest.tar.gz -C /usr/local/www/ [enter]
x wordpress/
x wordpress/xmlrpc.php
x wordpress/wp-blog-header.php
x wordpress/readme.html
...
x wordpress/wp-admin/options-reading.php
x wordpress/wp-trackback.php
x wordpress/wp-comments-post.php
user@freebsdsrv:~ $
user@freebsdsrv:~ $ ls -l /usr/local/www/wordpress [enter]
total 204
-rw-r--r-- 1 nobody nogroup 405 Feb 6 2020 index.php
-rw-r--r-- 1 nobody nogroup 19915 Jan 1 2024 license.txt
-rw-r--r-- 1 nobody nogroup 7409 Jun 18 2024 readme.html
-rw-r--r-- 1 nobody nogroup 7387 Feb 13 2024 wp-activate.php
drwxr-xr-x 9 nobody nogroup 102 Nov 21 15:07 wp-admin/
-rw-r--r-- 1 nobody nogroup 351 Feb 6 2020 wp-blog-header.php
-rw-r--r-- 1 nobody nogroup 2323 Jun 14 2023 wp-comments-post.php
-rw-r--r-- 1 nobody nogroup 3336 Oct 15 17:24 wp-config-sample.php
drwxr-xr-x 4 nobody nogroup 5 Nov 21 15:07 wp-content/
-rw-r--r-- 1 nobody nogroup 5617 Aug 2 2024 wp-cron.php
drwxr-xr-x 30 nobody nogroup 270 Nov 21 15:07 wp-includes/
-rw-r--r-- 1 nobody nogroup 2502 Nov 26 2022 wp-links-opml.php
-rw-r--r-- 1 nobody nogroup 3937 Mar 11 2024 wp-load.php
-rw-r--r-- 1 nobody nogroup 51367 Sep 30 21:12 wp-login.php
-rw-r--r-- 1 nobody nogroup 8543 Sep 19 00:37 wp-mail.php
-rw-r--r-- 1 nobody nogroup 29032 Sep 30 19:08 wp-settings.php
-rw-r--r-- 1 nobody nogroup 34385 Jun 19 2023 wp-signup.php
-rw-r--r-- 1 nobody nogroup 5102 Oct 18 17:56 wp-trackback.php
-rw-r--r-- 1 nobody nogroup 3246 Mar 2 2024 xmlrpc.php
user@freebsdsrv:~ $
Set file owner and group to www:www with:
user@freebsdsrv:~ $ sudo chown -R www:www /usr/local/www/wordpress ; ls -l /usr/local/www/wordpress [enter]
total 204
-rw-r--r-- 1 www www 405 Feb 6 2020 index.php
-rw-r--r-- 1 www www 19915 Jan 1 2024 license.txt
-rw-r--r-- 1 www www 7409 Jun 18 2024 readme.html
-rw-r--r-- 1 www www 7387 Feb 13 2024 wp-activate.php
drwxr-xr-x 9 www www 102 Nov 21 15:07 wp-admin/
-rw-r--r-- 1 www www 351 Feb 6 2020 wp-blog-header.php
-rw-r--r-- 1 www www 2323 Jun 14 2023 wp-comments-post.php
-rw-r--r-- 1 www www 3336 Oct 15 17:24 wp-config-sample.php
drwxr-xr-x 4 www www 5 Nov 21 15:07 wp-content/
-rw-r--r-- 1 www www 5617 Aug 2 2024 wp-cron.php
drwxr-xr-x 30 www www 270 Nov 21 15:07 wp-includes/
-rw-r--r-- 1 www www 2502 Nov 26 2022 wp-links-opml.php
-rw-r--r-- 1 www www 3937 Mar 11 2024 wp-load.php
-rw-r--r-- 1 www www 51367 Sep 30 21:12 wp-login.php
-rw-r--r-- 1 www www 8543 Sep 19 00:37 wp-mail.php
-rw-r--r-- 1 www www 29032 Sep 30 19:08 wp-settings.php
-rw-r--r-- 1 www www 34385 Jun 19 2023 wp-signup.php
-rw-r--r-- 1 www www 5102 Oct 18 17:56 wp-trackback.php
-rw-r--r-- 1 www www 3246 Mar 2 2024 xmlrpc.php
user@freebsdsrv:~ $
Create an Apache Include file to make wordpress available on the website with:
user@freebsdsrv:~ $ sudo ee /usr/local/etc/apache24/Includes/wordpress.conf [enter]
Add the following text;
Alias /wp/ "/usr/local/www/wordpress/"
<Directory "/usr/local/www/wordpress/">
DirectoryIndex index.php
Options None
AllowOverride Limit
# range of access allowed
Require ip 127.0.0.1 192.168.1.0/24
</Directory>
N.B.: Access is only allowed from computers connected to the network 192.168.1.0/24, the same network as this FreeBSD server!
Restart Apache
Restart Apache for the changes to take effect:
user@freebsdsrv:~ $ sudo service apache24 restart [enter]
Performing sanity check on apache24 configuration:
Syntax OK
Stopping apache24.
Waiting for PIDS: 9059.
Performing sanity check on apache24 configuration:
Syntax OK
Starting apache24.
user@freebsdsrv:~ $
Create the WordPress MariaDB Database
Log in to the MariaDB console with:
user@freebsdsrv:~ $ sudo mysql -u root -p [enter]
Enter password: <-- DBpassWD [enter]
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 19
Server version: 11.4.4-MariaDB FreeBSD Ports
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
root@localhost [(none)]>
Create a WordPress database with:
root@localhost [(none)]> create database wordpress; [enter]
Query OK, 1 row affected (0.000 sec)
root@localhost [(none)]>
Create a database user and password to manage the wordpress database with:
root@localhost [(none)]> grant all privileges on wordpress.* to 'wpdbadmin'@'localhost' identified by 'WPdbpassWd'; [enter]
Query OK, 0 rows affected (0.859 sec)
root@localhost [(none)]>
Flush privileges with:
root@localhost [(none)]> flush privileges; [enter]
Query OK, 0 rows affected (0.000 sec)
root@localhost [(none)]>
Exit the MariaDB console with:
root@localhost [(none)]> exit [enter]
Bye
user@freebsdsrv:~ $
Create file wp-config.php with:
user@freebsdsrv:~ $ sudo cp /usr/local/www/wordpress/wp-config-sample.php /usr/local/www/wordpress/wp-config.php [enter]
user@freebsdsrv:~ $
Generate unique phrases using the WordPress.org secret-key service at:
https://api.wordpress.org/secret-key/1.1/salt/
Edit file wp-config.php with:
user@freebsdsrv:~ $ sudo ee /usr/local/www/wordpress/wp-config.php [enter]
…and update settings as in this example:
<?php
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the installation.
* You don't have to use the website, you can copy this file to "wp-config.php"
* and fill in the values.
*
* This file contains the following configurations:
*
* * Database settings
* * Secret keys
* * Database table prefix
* * ABSPATH
*
* @link https://developer.wordpress.org/advanced-administration/wordpress/wp-config/
*
* @package WordPress
*/
// ** Database settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'wordpress' );
/** Database username */
define( 'DB_USER', 'wpdbadmin' );
/** Database password */
define( 'DB_PASSWORD', 'WPdbpassWd' );
/** Database hostname */
define( 'DB_HOST', 'localhost:/var/run/mysql/mysql.sock' );
/** Database charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );
/** The database collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );
/** Download and install online files or updates without running FTP server. */
define('FS_METHOD', 'direct');
/**#@+
* Authentication unique keys and salts.
*
* Change these to different unique phrases! You can generate these using
* the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}.
*
* You can change these at any point in time to invalidate all existing cookies.
* This will force all users to have to log in again.
*
* @since 2.6.0
*/
define('AUTH_KEY', 'O?wuw>h$O:[%S6Lo0M}FYMvH,)1i=Y,SK+cvD#-6g6%cb|0WGZqUvp59ar,XV4hU');
define('SECURE_AUTH_KEY', ':0h a;/LJc--PaG-PnwT(!eoWV;-A#n%}$ UiDNKsj,@QqV=,}rQ&&A}rQ99_Qbu');
define('LOGGED_IN_KEY', '-!Zx)z6;=if;ui }BPy-91=r5xgDJn+V8:B>`{+n$RM,dVEAk; YrAJk%GS=|;JF');
define('NONCE_KEY', '77zgrS_oip)dcQM!;]JH*!S=7GzS^T+fH<mF548.q4^|ASDPIw|hwVcaVv{Hl^&%');
define('AUTH_SALT', 'UBt<2jMOL3e/^gzi=LX+$kzsC5||b],@;srO8Z0q612^rcyuK!Eft9)`g=@dSn G');
define('SECURE_AUTH_SALT', ':<<8<S@MVR!.}2?(o=,t@,@5}Uu+c(Xi0A`Cn[dxTMJgvLjeXTnrx`d5A)-xF1+V'); define('LOGGED_IN_SALT', '@E{7>+%(Bw#?3+q|vN)Z?mr?evIEo3I>+S<<AEBFSKCK:bWYk0My]OKVD-pp2i#g');
define('NONCE_SALT', 'y+OD9?eFIE$T/.:;%FZA.|C%T6ikt,H5K.I-!2cAn<^+p>.+3eDc7v,c+1LdlUyH');
/**#@-*/
/**
* WordPress database table prefix.
*
* You can have multiple installations in one database if you give each
* a unique prefix. Only numbers, letters, and underscores please!
*
* At the installation time, database tables are created with the specified prefix.
* Changing this value after WordPress is installed will make your site think
* it has not been installed.
*
* @link https://developer.wordpress.org/advanced-administration/wordpress/wp-config/#table-prefix
*/
$table_prefix = 'wp_';
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*
* For information on other constants that can be used for debugging,
* visit the documentation.
*
* @link https://developer.wordpress.org/advanced-administration/debug/debug-wordpress/
*/
define( 'WP_DEBUG', false );
/* Add any custom values between this line and the "stop editing" line. */
/* That's all, stop editing! Happy publishing. */
/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', __DIR__ . '/' );
}
/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';
Run the WordPress Famous 5-minute install
In your browser go to https://192.168.1.50/wordpress/readme.html.
Click the link wp-admin/install.php and follow the instruction on the screen.