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 holdsWhat 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 siteJust 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:

text
WORDPRESS_DB_HOST
WORDPRESS_DB_NAME
WORDPRESS_DB_USER
WORDPRESS_DB_PASSWORD

Unlike 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:

text
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_SALT

Without 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:

text
WORDPRESS_CONFIG_EXTRA=define('WP_MEMORY_LIMIT', '256M');

If the table prefix is not wp_, set WORDPRESS_TABLE_PREFIX.

Deploy and install

  1. Deploy. Detect shows "WordPress, PHP 8.4", health /wp-login.php.
  2. For a new site, open the app's address → language → site name and admin → Install.
  3. 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-content is 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-content goes 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.

Mail

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

  1. Export the database from the old host (mysqldump --single-transaction mydb > site.sql, or phpMyAdmin → Export) and download the wp-content folder.
  2. Put wp-content in the repository or zip and deploy.
  3. In the panel, Databases → the database → Import SQL dump → site.sql.
  4. If the domain changes, the old address stays in the database — use a plugin such as Better Search Replace to turn http://old.example.com into https://new.example.com.

When something goes wrong

What you seeCause 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 loopSet 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 deploySet the WORDPRESS_*_KEY / SALT variables.
Mail does not go outAn SMTP plugin, port 587.

Stuck?

Talk to our engineers directly — by phone or email.

01782618248shohag.meghly@gmail.com