Guides
WordPress
Making a new WordPress site, or bringing an existing one to Meghly — with the database, plugins, mail and domains.
What to upload
| What the repository or zip holds | What happens |
|---|---|
only wp-content/ (themes, plugins) | WordPress core comes from Meghly, with your wp-content on top. The recommended way. |
all of WordPress (wp-admin, wp-includes, wp-content) | Your own core runs. |
| a brand-new site | Just a wp-content/ folder (with empty themes/ and plugins/). |
There is no need for a wp-config.php — Meghly supplies one that reads the database details from the environment. If you bring your own, read them with getenv() rather than hard-coding them.
It runs on PHP 8.4 and Apache, port 8080.
Database
In Apps → New app, choose PHP in What is it?, the Framework WordPress, and tick It needs a database (engine MariaDB or MySQL). These variables come by themselves:
WORDPRESS_DB_HOST
WORDPRESS_DB_NAME
WORDPRESS_DB_USER
WORDPRESS_DB_PASSWORDUnlike other apps, WordPress gets the database's owner (migration) login, because it creates and changes its own tables while running (install, plugin activation, core upgrades). That right covers only this database of yours.
Variables
Optional, but better set:
WORDPRESS_AUTH_KEY, WORDPRESS_SECURE_AUTH_KEY, WORDPRESS_LOGGED_IN_KEY, WORDPRESS_NONCE_KEY,
WORDPRESS_AUTH_SALT, WORDPRESS_SECURE_AUTH_SALT, WORDPRESS_LOGGED_IN_SALT, WORDPRESS_NONCE_SALTWithout them every build makes random keys of its own — the site stays safe, but everyone has to log in again after every deploy. Make them once with WordPress's salt generator and set them as secret variables.
For extra settings, write PHP define(...) lines in the WORDPRESS_CONFIG_EXTRA variable:
WORDPRESS_CONFIG_EXTRA=define('WP_MEMORY_LIMIT', '256M');If the table prefix is not wp_, set WORDPRESS_TABLE_PREFIX.
Deploy and install
- Deploy. Detect shows "WordPress, PHP 8.4", health
/wp-login.php. - For a new site, open the app's address → language → site name and admin → Install.
- Add your domain (Domains and HTTPS), then set "WordPress Address" and "Site Address" to the new
https://address in WordPress's Settings → General.
What stays and what does not
wp-contentis a volume. Themes, plugins and media survive deploys and restarts — including plugins and themes installed or updated from wp-admin.- Core updates do not happen from wp-admin (the core is read-only). A new core comes with a new deploy. If you bring your own core, update it in the repository and deploy.
- On the first deploy the repository's
wp-contentgoes onto the volume. Later deploys keep what is on the volume, so wp-admin's work is not lost — which means a theme changed later in the repository does not reach the running site. After the first deploy, upload or update themes and plugins from wp-admin.
WordPress's wp_mail cannot send straight out on port 25. Install an SMTP plugin (such as WP Mail SMTP) with your own mailbox: port 587, STARTTLS, username and password. Then "password reset" mail arrives properly and stays out of spam.
Bringing an existing site
- Export the database from the old host (
mysqldump --single-transaction mydb > site.sql, or phpMyAdmin → Export) and download thewp-contentfolder. - Put
wp-contentin the repository or zip and deploy. - In the panel, Databases → the database → Import SQL dump →
site.sql. - If the domain changes, the old address stays in the database — use a plugin such as Better Search Replace to turn
http://old.example.comintohttps://new.example.com.
When something goes wrong
| What you see | Cause and fix |
|---|---|
| "Error establishing a database connection" | Check the database is linked to the app; with your own wp-config.php, check it reads WORDPRESS_DB_*. |
| No CSS, a redirect loop | Set the Settings addresses to https://; search-replace after a domain change. |
| Plugin install: "could not create directory" | Check the wp-content volume in Files & backups. |
| Logged out after every deploy | Set the WORDPRESS_*_KEY / SALT variables. |
| Mail does not go out | An SMTP plugin, port 587. |