Skip to Main Content

How to change the name of the WordPress database

Divi: the easiest WordPress theme to use

Divi: The best WordPress theme of all time!

With over 901.000 downloads, Divi is the most popular WordPress theme in the world. It is complete, easy to use and comes with more than 62 free templates. [Recommended]

Have you just been the victim of a hack on your WordPress website?

You need to change everything on your WordPress blog. This change will affect all access keys, but also the name of the database of your WordPress installation.

If you have never installed WordPress, discover How to Install a WordPress Blog in 7 Steps et How to search, install and activate a WordPress theme on your blog

how to change name base data wordpress 1

But in this tutorial, I'll show you how to change the name of your WordPress database.

1. Access your PhpMyAdmin

It is a database management tool provided by most web hosts; so you'll find it on your "CPanel". The first step will be to change the name of your database on this tool.

Do you remember the name of your database? If not, you can always get it from the “wp-config.php” file at the root of your WordPress installation.


After having retrieved the name of your database, which should be able to match the list of databases in your installation on the administration tool " PhpMyAdmin ».

Discover 5 WordPress plugins to clean the database of your website

name-based data de

After clicking on the name of your database, you must click on the " operations ". On this new page, you need to register the new name of your database in the section " Rename the database as follows ».

In this example, we renamed the database " wp_bdd_nouveau ". Once done, click on " perform ". A window will ask you to confirm your action. After that, the database will have a new name.

If you suspect your database is the cause of your website slowness, find out How to optimize a database with one click on WordPress

Remark : at the moment your blog is unavailable. WordPress cannot access the database. It is now time to change the name of the database in the file " wp-config.php ».


Easily create your website with Elementor

Elementor allows you to easily create any website design with a professional look. Stop paying expensive for what you can do yourself. [Free]

2. How to modify the user assignment

At most web hosts, all databases are usually assigned to users. After editing the database, no more users will be assigned to the databaseit is therefore essential to reassign a user to this database.

You must click on the " privileges To access the SQL user privileges configuration interface.

Consult How to duplicate a WordPress database with phpMyAdmin to protect the latter


Then click on " New user », A new window will open.

New user

On this window you will be able to provide:

  • A name (make sure you provide a username that is difficult to find)
  • The customer concerned (default is "%" for all clients)
  • The password (You can click on the button Generate »Below to create a complex password)


Below, in the section " Global Privileges ”, You can define what the privileges of the SQL user are. But in order not to complicate your life, I will ask you this time to choose all the privileges, by clicking on " Check all ».

Discover How to fix problems with the database and WordPress files

Remark : you must make sure that all the boxes are checked. Also make sure to keep the username and password somewhere.


Once done, click on " perform " lower.

Are you looking for the best WordPress themes and plugins?

Download the best plugins and WordPress themes on Envato and easily create your website. Already more than 49.720.000 downloads. [EXCLUSIVE]

Open the file now wp-config.php And change the name and password of the user.


Remark : Be sure to keep the changes between the quotes.

This process is not very delicate, a priori if you follow all the instructions to the letter, no problem should arise. However, I will ask you to make a backup of your database, to prevent the irremediable.

Discover also some themes and premium WordPress plugins  

You can use other themes and WordPress plugins to give a modern look and optimize the grip of your blog or website.

Here we offer you some premium WordPress plugins and themes that will help you do that.

1. Mega Menu Monster

Mega Menu Monster is a premium WordPress plugin that will allow you to add mega menu to your pages on WordPress. Even if its use is much more suited to the header menus, the fact remains that this plugin also allows you to use it at the footer.mega menu monster wordpress

Among its features we find among others: the support of all modern browsers, responsive on all devices, the layout hhighly customizable (Background, colors, fonts) and many others.

Download | Demo | Web hosting

2. The Grid

The Grid is a premium WordPress grid plugin that allows you to present all types of posts in a fully customizable and responsive grid system. It is perfectly suited for displaying your blog, portfolio, e-commerce products or any kind of WordPress post type.The Grid Grid Responsive WordPress Plugin

This plugin supports the following file formats: standard, video, audio, gallery, link, quote. The possibilities are endless and can be easily controlled with a powerful control panel.

The Grid is one of the most advanced grid plugins on WordPress and also the only one with a 100% responsive touch slider. You can filter any kind of grid in this touch slider, which is just unique. The plugin can be easily integrated into a WordPress theme and with a personalized style ...

Download | Demo | Web hosting

3. Portfolio Designer

Portfolio Designer is another great premium option if you want to create a portfolio or an image gallery. Just install this plugin and use the options included to create your portfolio.Portfolio Designer WordPress portfolio plugin

Choose a grid, a slider or justify the layout, add a pagination, load your images manually or automatically, add title links, borders, shadows and custom colors and finally choose from more than 50 effects image and hover.

The created portfolio will be fully compatible with all browsers and mobile devices.

Download | Demo | Web hosting

Easily create your Online Store

Download free WooCommerce, the best e-commerce plugins to sell your physical and digital products on WordPress. [Recommended]

Recommended Resources

Find out about other recommended resources to help you build and manage your website.


Here is ! That's it for this tutorial. We hope this article will help you change the name of the database. If you liked it, don't hesitate to share with your friends on your favorite social networks

However, you will also be able to consult our resources, if you need more elements to carry out your projects of creation of Internet sites, by consulting our guide on the WordPress blog creation.

But, in the meantime, tell us about your Comments and suggestions in the dedicated section.


This article features 2 comments

  1. Hello when I modify the wp-config file to change the database,
    I go on my wordpress and I do refresh,
    then he offers me to install wordpress (although I had already installed it at the beginning),
    what to do?

    1. This means that there are errors in the information on the database. Check the identifiers, but also the empty spaces ...

Leave a comment

Your email address will not be published. Required fields are marked with *

This site uses Akismet to reduce unwanted. Learn more about how your comments data is used.

Back To Top