WordPress wp-config Generator

Create a complete wp-config.php in a minute: database details, random security keys, debugging, memory and update settings, and basic hardening. The file is made in your browser, so your database password goes nowhere.

Create the file

Generator

Database

Settings

When do you need a fresh file?

Moving the site

When WordPress moves to a new host with a different database and user.

After a hack

A clean file with new keys ends every old session.

Manual install

When you upload WordPress yourself instead of a one-click install.

Before you upload it

Do

  • Keep a copy of the current file before replacing it
  • Set the file permissions to 600 or 640
  • Use a database user for this site only

Avoid

  • Changing the table prefix on a live site without renaming tables
  • Leaving development mode on a live site
  • Uploading it anywhere it can be read in a browser, like a .txt copy

If you get a database connection error after uploading, see the error guide. To turn on the error log step by step, see debugging WordPress.

Example: moving a site to a new host

After copying the files and importing the database, create a database and user in cPanel, enter them here with the same old table prefix, and put the URL in the site URL box. Upload the file over the old one and open the site. If the domain changed, replace URLs with search-replace from the WP-CLI tool.

Key terms

Short definitions of what you meet along the way.

DB_HOST
The database server address, usually localhost.
ABSPATH
The full path of the WordPress folder on the server.
WP_DEBUG
The debug switch that shows or logs errors.

Frequently asked questions

Did not find your answer? Ask us on WhatsApp

Where do I find the database details?

In cPanel under MySQL Databases, or in the current file if the site still works.

Does changing the keys break the site?

No, it only logs everyone out and they sign in again.

Why FORCE_SSL_ADMIN?

It blocks dashboard access over unencrypted http.

Should I set WP_HOME and WP_SITEURL?

Only to pin the URL, for example after a move. Otherwise leave it empty to control it from Settings.

A fast WordPress site without the headache?

WordPress-tuned hosting with one-click install, backups and Arabic support.

Contact us on WhatsApp