1. What is WordPress?
WordPress is a dynamic website engine (CMS).
Request flow:
Browser
↓
Nginx
↓
PHP-FPM
↓
WordPress
↓
MariaDB
↓
Generated HTML
↓
BrowserUnlike a static site, WordPress generates pages on demand.
Example:
GET /aboutWordPress:
SELECT *
FROM wp_posts
WHERE post_name='about';Then builds HTML and returns it.
2. Dynamic vs Static Websites
Static Website (Quartz)
Markdown
↓
Build
↓
HTML Files
↓
NginxRequest:
/aboutNginx simply serves:
about/index.htmlNo code execution.
Dynamic Website (WordPress)
/about
↓
PHP executes
↓
Database query
↓
HTML generatedAdvantages:
-
Easy editing
-
User accounts
-
Comments
-
Admin dashboard
Disadvantages:
-
More CPU
-
More security concerns
-
More moving parts
3. WordPress Architecture
Core
Main application.
wp-admin/
wp-content/
wp-includes/
index.php
wp-config.phpDo not modify core files.
Themes
Control appearance.
Think:
Theme ≈ Frontend/UIResponsible for:
-
Layout
-
Colors
-
Fonts
-
Navigation
Plugins
Add functionality.
Think:
Plugin ≈ Extension ModuleExamples:
-
SEO
-
Contact Forms
-
Caching
-
E-Commerce
Database
Stores:
-
Pages
-
Posts
-
Users
-
Settings
-
Comments
Main tables:
wp_posts
wp_users
wp_comments
wp_options4. Installation Architecture
Server:
Ubuntu
├── Nginx
├── PHP-FPM
├── MariaDB
└── WordPressWordPress requires:
MariaDB
Database:
CREATE DATABASE brewnbloom;PHP-FPM
Executes PHP.
Example:
/run/php/php8.3-fpm.sockNginx
Important config:
location / {
try_files $uri $uri/ /index.php?$args;
}This sends unknown URLs to WordPress routing.
5. HTTPS Troubleshooting Lesson
Problem:
brewnbloom.netshowed AES site instead of WordPress.
Root cause:
HTTPS configuration still pointed to previous site.
Important lesson:
HTTP config ≠ HTTPS configAlways inspect:
sudo nginx -TWordPress was actually working after fixing the SSL server block.
6. WordPress Users vs Database Users
Very important distinction.
Database User
Stored in:
wp-config.phpExample:
define('DB_USER', 'wpuser');
define('DB_PASSWORD', 'StrongPassword');Purpose:
WordPress ↔ MariaDBWordPress User
Stored in:
wp_usersPurpose:
Browser ↔ WordPressExample:
adminThese are completely separate accounts.
7. Reset WordPress Password via SQL
Find users:
SELECT ID, user_login, user_email
FROM wp_users;Reset password:
UPDATE wp_users
SET user_pass = MD5('NewPassword')
WHERE user_login = 'admin';Then login:
https://brewnbloom.net/wp-login.php8. WordPress Email Architecture
WordPress itself does not send SMTP.
Flow:
WordPress
↓
PHP mail()
↓
sendmail
↓
SMTP Server
↓
InternetCurrent server status:
sendmail_path configuredbut:
/usr/sbin/sendmaildoes not exist.
Result:
Email silently failsFuture solution:
-
SMTP Plugin
-
Gmail SMTP
-
Brevo SMTP
-
Zoho SMTP
Do not run a mail server unless necessary.
9. Posts vs Pages
Posts
Blog/news content.
Examples:
New Coffee Menu
Valentine Promotion
Flower WorkshopCharacteristics:
-
Date
-
Author
-
Categories
-
Tags
Think:
Posts ≈ News FeedPages
Permanent content.
Examples:
Home
About
Contact
MenuCharacteristics:
-
No date relevance
-
No categories
-
Hierarchical
Think:
Pages ≈ Company Information10. Internal Storage
Both Posts and Pages live in:
wp_postsDifference:
post_typeExample:
Hello World → post
About Us → pageMental model:
Page = Post + post_type='page'11. First Published Pages
Created:
/about-brew-bloom/
/ve-brew-bloom/Request lifecycle:
URL
↓
WordPress Router
↓
Database Query
↓
Theme
↓
Generated HTMLThis is the core WordPress request flow.
Key Mental Models
WordPress = PHP Application + Database + Admin DashboardTheme = FrontendPlugin = Extension Modulewp-config.php = Application Configurationwp_users = Login Accountswp_posts = Content StorageNginx → PHP → WordPress → MariaDBIf these mental models are clear, WordPress is no longer a black box but simply another web application stack.