Website Without PHP
English (United Kingdom)GB
  • English (United States)
  • English (United Kingdom)
  • Dutch (Netherlands)
  • Dutch (Belgium)
Menu

wp-config.php

wp-config.php is the file containing basic settings for a WordPress installation, including its database connection.

Read the explanation

WordPress Last updated:

wp-config.php is the file containing basic settings for a WordPress installation, including its database connection. You normally do not need to edit this technical file yourself. An administrator may inspect it during a move or while investigating a failure.

Ask which setting is being checked and why. This keeps the question focused on WordPress, the database or the hostingWeb hosting is the service that keeps your website's files on a computer that is always online, so visitors can open your site at any time. environment rather than treating every setting as interchangeable.

What belongs in this file?

The WordPress wp-config.php handbook describes the installation’s base configuration, including database connection information. Options for troubleshooting and other WordPress behaviour can also appear there. Have the administrator check which settings your own installation uses instead of assuming it matches an example found online.

This file belongs to WordPressWordPress is free software for building and editing a website in your browser. It is written in PHP, so it builds each page when someone visits.. It is not a general control panel for the whole server. When asking for help, identify the installation as well as the filename.

A test site and a live site each have their own context. Ask the administrator to state that context explicitly in the maintenance record.

A handbook example explains a particular setting. It is not a complete replacement for an existing configuration. During maintenance, record which setting changes and what the intended result is.

That makes the work easier to review and gives the next person a useful explanation instead of an unexplained difference between two files.

How is it different from php.ini?

Which PHP version does your site report?

We read only what your site already sends in public: the headers and the top of the homepage. No scan, no login.

The names appear together because both files contain settings, but they belong to different layers. php.iniphp.ini is the settings file for PHP on your hosting. It sets limits, such as how much memory a script may use, how big an upload may be and if errors show. configures PHPPHP is a programming language that builds your web pages on the computer that hosts your site, just before they reach the visitor. WordPress runs on it., while wp-config.php configures a WordPress installation. Changing WordPress configuration does not automatically replace or update the PHP installation used by your hosting provider to serve the website.

Make the question specific. Investigating why WordPress cannot reach its database is a different task from finding the PHP versionA PHP version is a numbered edition of PHP, like 8.3. Each edition is looked after for a limited time, then gets security fixes only, then nothing. assigned to a domainA domain name is the address people type to reach your website, such as yourcompany.com. It points visitors to wherever your site is hosted.. Begin with the observed problem and let the administrator identify the relevant layer.

Avoid changing several unrelated settings before anyone has explained what each change is supposed to test.

Use the hosting guides to locate the domain’s PHP version controls. If the environment is unclear, ask the host what handles the website’s requests. A version recorded in an old handover note is not a current measurement.

Include the date and checked environment when recording the result of a new check.

Investigating an error

Record the exact message, domain and action that produced it. Mention a recent move or configuration change if there was one. Leave secret values out of your report.

The person investigating needs a useful description of the failure, not automatically a copy of every configuration detail associated with the website.

WordPress provides WP_DEBUGWP_DEBUG is a WordPress setting that makes hidden errors visible or saves them to a file, which helps find out why a site shows a blank page. for error investigation. Agree with the administrator which information is needed and how it will be collected. Review temporary diagnostic settings when the investigation ends.

The purpose is to answer a specific question about a failure, rather than collect technical output without a clear reason for using it.

The Error Hub can help identify familiar error wording. A database connection message is a reason to investigate that connection, not proof that every setting in wp-config.php is wrong. Ask the administrator to test one explanation and record the result before making another unrelated change.

Checking a website move

Agree who owns configuration for the destination environment before the move. Have that person identify which installation belongs to each environment. Confirm that the test copy is treated as a test copy and the live site uses the intended data.

Do not copy a complete configuration without reviewing the differences between those environments.

Prepare a recovery plan before changing settings. The administrator should be able to find the previous configuration and identify other changes made alongside it. If files, database contents and hosting settings all change, an old configuration file alone is not a complete recovery plan.

Document those relationships in the maintenance task.

After the change, check a site visit, sign-in and an important dashboard action. Then test the visitor action that matters most, such as submitting a form. Record the observed outcome.

Saving a file successfully does not prove that the intended user action now works or that the move is complete.

Configuration and maintenance evidence

Consult the security status page for current PHP context. Do not use wp-config.php as evidence that the server has been updated. The PHP Exposure Check examines public signals; it does not read this internal file as a configuration inventory.

Keep those forms of evidence separate when discussing results.

If you plan to update PHP in WordPress, check both the PHP environment and the website’s behaviour. Describe your question with the error and the time the site changed. Request a focused review of the relevant setting and a test whose result you can recognise.

Frequently asked questions

Is wp-config.php the same as php.ini?

No. wp-config.php belongs to a WordPress installation. php.ini configures the PHP environment that can run WordPress and other applications.

Can I replace it with an example file?

An example does not know your database, environment or existing settings. Have the administrator apply only the intended change to the correct installation.

Should I share the whole file when asking for help?

No. Describe the error and ask your administrator to provide only the necessary information, with passwords and other secret values removed.

Share this page

Ask your AI to explain

Opens the chat with a question about this page. An AI answer can differ; the sources above are leading.

This question is sent along: Summarise the confirmed facts on https://websitewithoutphp.com/en-gb/glossary/wp-config-php/ in 5 short points, with the source per point.

  1. Domain
  2. Check
  3. Result
  4. Report

Which PHP version does your site run?

Enter your domain. We read only what your site already sends in public: the headers and the top of the homepage. No scan, no login.

We keep the domain and the result, never your IP address.