How to Fix the “WordPress Database Error Disk Full” Error

Are you looking to fix the ‘WordPress database error disk full’ error?

The ‘WordPress database error disk full’ message is shown when your web hosting server’s storage space is running out. This can cause problems and slow down your site.

In this article, we will show you how to easily fix the ‘WordPress database error disk full’ error, step by step.

Fix the "WordPress Database Error Disk Full" Error

What Causes the ‘WordPress Database Error Disk Full’ Error?

WordPress uses a database to store all of a website’s content, including posts, pages, images, user information, and more. However, when the database is full and needs more storage space, it shows the ‘WordPress Database Error Disk Full’ message.

It is a common WordPress error that occurs when storage reaches its limit, and the database can no longer perform its usual functions, such as creating new entries or updating existing ones.

Once that happens, you may be unable to publish content on your WordPress blog. Users will also be unable to log in, and images or other media files may not be displayed correctly on the website’s front page.

Additionally, the error can increase the page load time, resulting in a poor user experience.

Having said that, here are some tips that can help you fix the ‘database error disk full’ error in WordPress.

Note: We recommend creating a backup for your database before you make any changes. This will allow you to restore your database if something goes wrong. For details, see our tutorial on how to make a WordPress database backup manually.

1. Upgrade Your Hosting Plan

The most common reason for the ‘WordPress database error disk full’ error is limited space on your hosting plan.

Web hosting is where your website lives online, and each hosting plan comes with a specific amount of storage space. This storage gets filled up by your WordPress database (posts, pages, comments) and other website files (media, plugins, themes).

For example, you may have bought a cheap WordPress hosting plan that offers only 10GB of storage for your small business.

HostGator pricing

However, as your site grows, you will need more space and may come across the ‘WordPress database error disk full’ message.

In that case, you can easily fix it by upgrading to a better hosting plan or switching to another hosting company.

We recommend opting for Hostinger, which offers 100GB SSD storage for only $2.69/month, along with a free SSL certificate, automated updates, weekly backups, and more. You can also upgrade to higher plans for even more storage.

Hostinger website

Hostinger also offers a huge discount to WPBeginner readers, along with a free domain name.

To get the discount, just click the button below.

Once you have upgraded your hosting plan, you can visit your website again to see if the ‘WordPress database error disk full’ error has been fixed.

2. Remove Unnecessary Files in the Database

If upgrading does not fix the error, you can try removing unnecessary files in the database, such as old backups, spam emails, logs, or installers you no longer need.

If you are a complete beginner, then you can optimize your database using a plugin like WP Optimize. This popular plugin lets you clear up unwanted data like post revisions, spam comments, trash, transient options, and orphaned metadata right from your WordPress dashboard.

Upon plugin activation, visit the WP-Optimize » Database page, where you will see a list of operations that the plugin will perform on your database.

You can review them carefully and uncheck any item that you don’t want to delete at the moment.

Optimize database from WordPress dashboard

After that, click the ‘Run on all selected items’ button to remove unnecessary files easily.

For more information, see our tutorial on how to optimize your WordPress database with one click.

Alternatively, you can manually remove database files. To do this, you will need to visit your hosting account’s dashboard. For this tutorial, we will be using Bluehost, but your dashboard may look a bit different depending on the hosting you use.

Upon opening the Bluehost dashboard, switch to the ‘Advanced’ tab at the top. Scroll down and click the ‘Manage’ button next to the ‘PHPMyAdmin’ option.

Note: Keep in mind to create a backup for your database before you make any changes.

Click the Manage button next to the PHPMyAdmin option

This will open phpMyAdmin on a new screen, where you must switch to the ‘Databases’ tab from the top.

Now locate your database name and click on it to open the files.

Connect PHPMyAdmin with your database

If you don’t know your database’s name, then you can head back to the Bluehost dashboard and scroll down to the ‘Databases’ section.

Here, you will be able to see your database’s name.

Find database name

Once you click on your database, phpMyAdmin will show a list of all the folders that are stored on your website.

From here, click on any folder of your choice to view its content.

Choose a database folder to view its content

A list of files stored in that folder will now open up on your screen.

From here, you can click the ‘Delete’ link for files that you feel are unnecessary and taking too much space on your database.

Delete unnecessary database files

Now, repeat this process until you free up storage space in your database.

3. Delete WordPress Plugins and Themes

Deleting unnecessary database files should fix the ‘WordPress database error disk full’ error. However, just to be on the safe side, we also recommend deleting WordPress plugins and themes that you don’t use on your website.

To delete a plugin, visit the Plugins » Installed Plugins page from the WordPress dashboard. Here, click the ‘Delete’ link next to the plugins that you want to remove.

For more information, see our beginner’s guide on how to properly uninstall a WordPress plugin.

Delete a WordPress plugin

After that, head over to the Appearance » Themes page to remove the themes that you are not currently using on your website.

For example, you can delete the default WordPress themes like Twenty Twenty. To do this, click on the ‘Theme Details’ button.

Delete a WordPress theme

Once you do that, a prompt will open up where you must click the ‘Delete’ link.

For details, see our tutorial on how to delete a WordPress theme.

Click the Delete link

We also recommend deleting large media files. You should optimize all the images before adding them to your website.

For instance, you can use the PNG and JPEG formats to save images and use compression plugins to make a media file’s size smaller.

Optimize image before saving

For details, see our step-by-step guide on how to optimize images in WordPress without losing web quality.

Bonus: Use WPBeginner Pro Services For Site Maintenance

Do you feel overwhelmed when trying to fix WordPress errors, keep on top of regular updates, and do other routine tasks to keep your website running well?

It might be time to hire professionals for regular site maintenance. These professionals will keep your WordPress core, plugins, and themes updated and fix any WordPress errors that your website may face.

We recommend using our WPBeginner Maintenance and Support Services.

WPBeginner Pro Maintenance Services

Our team has 16+ years of experience in running websites and provides 24/7 priority WordPress support, uptime monitoring, and complete malware removal.

It is an ideal choice for small businesses because we offer affordable pricing.

Additionally, our team can improve your site’s speed and SEO, repair a hacked site, and completely rebuild your existing WordPress site according to your liking.

For more details, see all of our WPBeginner Professional Services.

We hope this article helped you learn how to easily fix the ‘WordPress database error full disk’ error. You may also want to see our beginner’s guide on how to prevent SQL injection attacks in WordPress and our top picks for the best WordPress database plugins.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Fix the “WordPress Database Error Disk Full” Error first appeared on WPBeginner.

How to Enable / Activate WordPress Plugins from the Database

Are you looking to enable or activate plugins from the WordPress database?

If you are unable to access your WordPress admin area and need to activate a plugin to restore your access, then you can do that from the WordPress database.

In this article, we will show you how to easily activate your WordPress plugins using the database.

How to enable/activate WordPress plugins from the database

When Should You Activate WordPress Plugins Using Database

A number of common WordPress errors can prevent a website owner from accessing the WordPress admin area. In most of those situations, the user is looking to deactivate WordPress plugins without admin access.

However in some situations, a website owner may need to activate certain plugins to restore access to their WordPress website.

For example, let’s assume an error is stopping you from accessing your WordPress dashboard, and you have found a plugin that can fix that error.

Luckily, WordPress stores the active plugins information in your WordPress database. This means you can manually enter this information directly in the database and tell WordPress to activate a plugin.

The only condition is that the plugin must be installed on your WordPress site. Which means that it should be present in the plugins folder on your WordPress website.

With that being said, let’s see how you can easily enable/activate a plugin using the database.

Step 1. Find Your Database Name Using the Hosting Control Panel

To activate your WordPress plugins using phpMyAdmin, first, you need to find out your WordPress database’s name.

Now, to find the name of your database, you need to log in to your web hosting dashboard. For this tutorial, we will be using Bluehost.

If you are using a different hosting company, then your WordPress hosting dashboard may look slightly different.

Once you are on the cPanel, scroll down to the ‘Files’ section and click the ‘File Manager’ option.

Click at the file manager

This will open up the File Manager in a new window. Here you simply need to locate and click the public_html folder from the left column.

This will open up all the files that are stored in the public_html folder. Now, you simply need to locate and click the folder with your site’s name on it present under the ‘Name’ column.

Go to the publich_html file and find your site name

Some users may instead see their WordPress files and folders installed inside public_html folder.

After you have opened up your WordPress site’s file, locate the wp-config.php file under the ‘Name’ section and right-click on it.

This will open up a menu where you need to select the ‘View’ option.

Click View

This will open up the wp-config.php file in a new window where you can locate your database details.

We recommend that you copy and paste your database details including username and password into a notepad on your computer.

Database details

Now you’ve successfully found your database’s name, let’s move to our next step.

Step 2. Locate Active Plugins Option via PhpMyAdmin

After you have found out the name of your database, you need to go back to your WordPress hosting control panel.

Once there, scroll down to the ‘Databases’ section and click the ‘phpMyAdmin’ option.

Click the phpMyAdmin option in the cPanel

This will launch the phpMyAdmin app in a new browser tab.

Note: Before you make any kind of changes, please make sure to create a complete backup of your database. It will come in handy if anything goes wrong with the process.

Next, you simply need to click the ‘Database’ tab from the navigation menu present at the top of the page.

Now, simply locate your WordPress database and click on the browse button to expand it.

Click the Database tab from the navigation menu

This will show your WordPress database tables.

Here, you will simply need to locate wp_options table and click browse next to it.

Note: By default, WordPress uses wp_ as the prefix for table names. Your WordPress database table may have a different table prefix.

Click at wp-options

Inside the wp_options table, you’ll need to find the row where option_name is set toactive_plugins.

After that, click on the Edit link next to it.

Click the Activate_Plugins option

This will open up a box where you can manually enter details to activate a plugin.

Step 3. Activate a Plugin Using phpMyAdmin

WordPress stores the active plugins information in a special format so that it can be programatically accessed by the software.

In order to tell WordPress which plugins to activate, we’ll need to use that same format.

First, we’ll start by entering the option_value as a:1: and then open up the curly bracket ({).

We are entering this value as 1 because we only want to activate one plugin. You have to change the value to the number of plugins you plan on activating.

Add option value

Next, we will be entering i:0; after the curly bracket. Here we are essentially assigning a serial number to our plugin.

Remember to always assign numbers starting from 0 instead of 1.

Add serial number

Next, we will be entering the number of characters present in the plugin’s name and the php file name of the plugin that we’re about to activate.

For that, we will type s:24: in the box. Keep in mind that the number of characters will differ for each plugin based on the characters in the plugin directory and file name.

For instance, we are activating WPForms in this tutorial which has 24 characters in its name including the file name of the plugin as stored in our file manager.

Add character number

Next, you just need to type the plugin’s directory name. You can find it by visiting the /wp-content/plugins/ folder using the File Manager app.

Don’t forget to add quotation marks before typing the plugin’s directory name.

Type the plugins' name

After the /, you need to enter the plugin’s file name. This is usually the file with similar name inside the plugin folder.

Plugin file and folder name

Now, go back to phpMyAdmin and type the name of the plugin and then close the quotation marks.

After that, simply add a semi-colon (;) and close the curly brackets (}). The final value in this example would look like this:

a:1:{i:0;s:24:"wpforms-lite/wpforms.php";}

This is how it will look once you’re done.

Activating a single plugin

Next, simply click the ‘Go’ button to execute the command.

Now go visit your WordPress dashboard and head over to Plugins » Installed Plugins.

Your plugin has been successfully activated.

activated-plugin

Now let’s say you want to activate two more plugins.

First you will need to change the number of plugins. After you will adjust each entry for the plugin that you want to activate.

Here is an example:

a:3:{
i:0;s:47:"all-in-one-seo-pack-pro/all_in_one_seo_pack.php";
i:1;s:35:"insert-headers-and-footers/ihaf.php";
i:2;s:24:"wpforms-lite/wpforms.php";
}

Note: We have added line breaks here to make the code look more readable. You need to make sure that there are no line breaks or spaces in your code. Otherwise, it wouldn’t work.

We hope you learned how to activate a plugin using the database. You may also want to see our guide on how to add social media feeds to WordPress, and our comparison of the best domain registrars in the world.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Enable / Activate WordPress Plugins from the Database first appeared on WPBeginner.

Beginner’s Guide to WordPress Database Management with phpMyAdmin

WordPress is written using PHP as its scripting language and MySQL as its database management system. In order to use WordPress, you don’t really need to learn either of them.

However, a very basic understanding of the two could help you troubleshoot problems as well as increase your understanding of how WordPress works (behind the scenes).

In this article, we will explain how WordPress uses the database including a intro to default WordPress database tables.

We will also show you how to manage a WordPress database using phpMyAdmin which will include creating database backups, optimizing the WordPress database, and more.

How to manage WordPress database using phpMyAdmin

This is a comprehensive guide on WordPress database management, so we have added a table of contents for easier navigation:

What is a Database and How WordPress Uses it?

A database is a system of storing and fetching data in an organized way. Database allows software to manage data in a programmable way.

For example: WordPress uses PHP (programming language) to store and retrieve data from the database.

The information stored in a WordPress database includes posts, pages, comments, categories, tags, custom fields, users, and other WordPress settings. We will elaborate on this later in the tutorial when we cover all WordPress database tables.

When you first install WordPress, it asks you to provide a database name, host, username, and password. This information is stored in the configuration file called wp-config.php.

WordPress database information

During the installation, WordPress uses the information you provide about the database to create tables and store default installation data inside those tables.

After the installation, WordPress runs queries to this database to dynamically generate HTML pages for your website or blog.

This is what makes WordPress extremely powerful because you don’t have to create a new .html file for each page that you want to create. WordPress handles everything dynamically.

Where is my WordPress database stored?

WordPress uses MySQL as its database management system, which is a software installed on your WordPress hosting server. Your WordPress database is also stored on the same server.

This location however is not accessible on most shared hosting environments. However, if you are on a VPS hosting plan or a dedicated server, then you can use command line tools to locate the database.

Most often it is located at the following path:

/var/lib/mysql/your_database_name

However, this could differ from one hosting provider to another.

It is important to keep in mind that you don’t really need to access the database file itself. You can use other tools like phpMyAdmin to manage your database.

What is phpMyAdmin?

PhpMyAdmin is a web-based software that allows you to manage MySQL databases using your web browser. It offers an easy to use interface that allows you to run MySQL commands and database operations.

You can also use it to browse and edit database tables, rows, and fields. It also allows you to import, export, or delete all data inside a database.

How to Access PhpMyAdmin?

PhpMyAdmin comes pre-installed with all top WordPress hosting companies. You can find it under the Databases section of your hosting account’s cPanel dashboard. Below is an example screenshot from Bluehost control panel:

phpMyAdmin in cPanel

Depending on your hosting provider, your cPanel interface may look different than the above screenshot. You would still be able to find phpMyAdmin icon under the databases section.

Clicking on it will open the phpMyAdmin interface where you can select your WordPress database from the left column. After, that phpMyAdmin will display all tables in your WordPress database.

PhpMyAdmin dashboard

Let’s take a look at the WordPress database tables.

Understanding WordPress Database Tables

Each WordPress installation has 12 default tables in the database. Each database table contains data for different sections, features, and functionality of WordPress.

Looking at the structure of these tables, you can easily understand where different parts of your website are stored. Currently, a default WordPress installation creates the following tables:

Note: wp_ before each table name is the database prefix you choose during the installation. It can be different if you changed it at the time of installation.

wp_commentmeta : This table contains meta information about comments posted on a WordPress website. The table has four fields meta_id, comment_id, meta_key, and meta_value. Each meta_id is related to a comment_id. One example of comment meta information stored is the status of comment (approved, pending, trash, etc).

wp_comments : As the name suggests this table contains your WordPress comments. It contains comment author name, url, email, comment, etc.

wp_links : To manage blogrolls create by earlier versions of WordPress or the Link Manager plugin.

wp_options : This table contains most of your WordPress site-wide settings such as: site url, admin email, default category, posts per page, time format, and much much more. The options table is also used by numerous WordPress plugins to store plugin settings.

wp_postmeta : This table contains meta information about your WordPress posts, pages, and custom post types. Example of post meta information would be which template to use to display a page, custom fields, etc. Some plugins would also use this table to store plugin data such as WordPress SEO information.

wp_posts : The name says posts but actually this table contains all post types or should we say content types. This table contains all your posts, pages, revisions, and custom post types.

wp_termmeta : This table allows developers to store custom metadata for terms under their custom taxonomies. For example, WooCommerce uses it to store metadata for product attributes and categories.

wp_terms : WordPress has a powerful taxonomy system that allows you to organize your content. Individual taxonomy items are called terms, and they are stored in this table. For example, your WordPress categories and tags are taxonomies, and each category / tag inside them is a term.

wp_term_relationships : This table manages relationship of WordPress post types with terms in wp_terms table. For example this is the table that helps WordPress determine post X is in Y category.

wp_term_taxonomy : This table defines taxonomies for terms defined in wp_terms table. For example, if you have a term “WordPress Tutorials“, then this table contains the data that says it is associated with a taxonomy called category. In short, this table has the data that helps WordPress differentiate between which term is a category, which is a tag, etc.

wp_usermeta : Contains meta information about registered users on your website.

wp_users : Contains user information like username, password, user email, etc.

Managing WordPress Database using phpMyAdmin

Your WordPress database contains important WordPress settings, all your blog posts, pages, comments, and more. You need to be extremely careful when using phpMyAdmin, or you may end up accidentally deleting important data.

As a precaution, you should always create a complete database backup. This would allow you to restore your database the way it was before.

Let’s take a look at how to easily create a WordPress database backup.

Creating a WordPress Database Backup using phpMyAdmin

To create a backup of your WordPress database from phpMyAdmin, click on your WordPress Database. On the top menu, click on the Export tab.

Export WordPress database

In newer versions of phpMyAdmin, it will ask you for an export method. The quick method will export your database in a .sql file. In the custom method, it will provide you with more options and ability to download backup in compressed zip or gzip archive.

We recommend using the custom method and choosing zip as the compression method. The custom method also allows you to exclude tables from the database.

Let’s say if you used a plugin that created a database table, and you are no longer using that plugin, then you can choose to exclude that table from the backup if you want.

Compression method

Your exported database file can be imported back into a different or the same database using phpMyAdmin’s import tab.

Creating a WordPress Backup using a Plugin

Keeping regular backups of your WordPress site is the best thing you can do for your WordPress security. While the WordPress database contains the majority of your site information, it still lacks several fairly important elements such as template files, images, uploads, etc.

All your images are stored in the uploads folder in your /wp-content/ directory. Even though the database has the information which image is attached to a post, it is useless if the image folder doesn’t have those files.

Often beginners think that the database backup is all that they need. It is NOT true. You need to have a full site backup that includes your themes, plugins, and images.

While most hosting companies claim they have daily backups, we recommend that you keep backups yourself just in case.

Note: If you are on a managed WordPress hosting solution like WPEngine, then they do create daily backups.

For the majority of us who are not on WPEngine, you should use a WordPress backup plugin to set up automated WordPress backups on your site.

Importing a WordPress Database Backup via phpMyAdmin

PhpMyAdmin also allows you to easily import your WordPress database. Simply launch phpMyAdmin and then select your WordPress database.

Next, you need to click on the ‘Import’ link from the top menu.

Import database via phpMyAdmin

On the next screen, click on the Choose file button and then select your database backup file you downloaded earlier.

PhpMyAdmin will now process your backup file upload and import it into your WordPress database. Once finished, you will see a success message.

Database imported successfully

Optimizing your WordPress Database in phpMyAdmin

After using WordPress for a while, your database becomes fragmented. There are memory overheads which increase your overall database size and query execution time.

MySQL comes with a simple command that allows you to optimize your database. Simply go to phpMyAdmin and click on your WordPress database. This will show you a list of your WordPress tables.

Click on the check All link below the tables. Next to it, there is a “With Selected” drop down, you need to click on it and choose Optimize table.

Optimize WordPress database tables

This will optimize your WordPress database by defragmenting selected tables. It will make your WordPress queries run a little faster and slightly reduce the size of your database.

Fixing WordPress Issues using PhpMyAdmin

As we mentioned earlier, phpMyAdmin is a handy tool for troubleshooting and fixing some common WordPress errors and issues.

Let’s check out some common WordPress issues that can be easily fixed using phpMyAdmin.

Reset WordPress Password Using PhpMyAdmin

If you forgot your WordPress admin password and cannot recover it via lost password email, then this method allows you to quickly reset WordPress password.

First, launch the phpMyAdmin and select your WordPress database. This will display your WordPress database tables where you need to browse next to wp_users table.

Browse user table

Note: Table names in your WordPress database may have a different table prefix than the one we are showing in our screenshot.

You will now see the rows in your WordPress users table. Go ahead and click on the edit button next to the username where you want to change the password.

Edit user

PhpMyAdmin will show you a form with all the user information fields.

You will need to delete the value in the user_pass field and replace it with your new password. Under the function column, select MD5 from the drop-down menu and click on the Go button.

Change user password

Your password will be encrypted using the MD5 hash and then it will be stored in the database.

Congratulations! You have successfully changed your WordPress password using phpMyAdmin.

Now some of you may be wondering why did we select the MD5 hash to encrypt the password.

In the older version, WordPress used MD5 hash to encrypt passwords. Since WordPress 2.5, it started using stronger encryption technologies. However, WordPress still recognizes MD5 to provide backward compatibility.

As soon as you log in using a password string stored as an MD5 hash, WordPress recognizes it and changes it using the newer encryption algorithms.

Adding a New Admin User to WordPress using PhpMyAdmin

Let’s suppose you have access to the WordPress database but not the WordPress admin area. While you can change the admin user password, it will prevent the other admin user from using their account.

An easier solution would be to add a new admin user via phpMyAdmin.

First, you need to launch the phpMyAdmin and then select your WordPress database. This will show your WordPress database tables where you need to click on the ‘Browse’ link next to wp_users table.

Browse user table

phpMyAdmin will now show you the rows inside the wp_users table. Go ahead and click on the ‘Insert’ link from the menu on the top.

Insert new row in WordPress users table

This will bring up a form that you need to fill up to add a new user to your WordPress site.

Fill user form

Here is how you need to fill each field in this form.

  • ID – You can ignore this one as this is automatically generated.
  • user_login – This will be your WordPress username that you’ll use to login.
  • user_pass – This is your WordPress password you need to enter the password and select MD5 in the function column.
  • user_nicename – This is the URL friendly username you can use the as your login.
  • user_email – Enter a valid email address as you may need it to recieve password reset and WordPress notification emails.
  • user_url – Add your website URL or you can leave it blank.
  • user_registered – You need to select the CURRENT_TIME in the function column to automatically insert current time here.
  • user_activation_key – You can leave this field blank as well it is used to approve user registeration.
  • user_status – You can leave this field blank as well.
  • display_name – You can enter the user’s full name as you want to be displayed on the articles. You can also leave it blank.

After filling in the form, click on the Go button to insert it into your WordPress database. PhpMyAdmin will now run the MySQL query to insert the data.

We have added the user, but that user does not have an administrator user role on your WordPress site. This value is saved in another table called wp_usermeta.

Before we can make this user an administrator, we will need to find the user ID. Simply click on the ‘Browse’ link next to wp_users table and you will see a row containing your newly added user with their user ID.

Find user ID

Note down the user ID as you’ll need it in the next step.

Now, let’s open the wp_usermeta table by clicking on the Browse link next to it.

Browsing wp_usermeta table

Next, you need to click on the Insert link at the top to add a new row to the table.

Insert new row to usermeta table

You’ll now see a form to enter a new row. This is where you’ll tell WordPress that the user you created earlier has the administrator user role.

Adding administrator user role via usermeta

Here is how you’ll fill in this form.

  • umeta_id – You need to leave it blank as it is automatically filled in.
  • user_id – Enter the user ID you copied earlier.
  • meta_key – You need to enter wp_capabilities in this field. However, you may need to replace wp_ if your WordPress table names use a different prefix.
  • meta_value – You need to enter the following serialized value:
    a:1:{s:13:"administrator";s:1:"1";}

Finally, click on the Go button to save your changes.

Next, we need to add another row to define the user level. Click on the Insert link on the top menu to add another row to the usermeta table.

Adding the user level meta field

Here is how you’ll fill in this form.

  • umeta_id – You need to leave it blank as it is automatically filled in.
  • user_id – Enter the user ID for your newly added user.
  • meta_key – You need to enter wp_user_level in this field. However, you may need to replace wp_ if your WordPress table names use a different prefix.
  • meta_value – Here you need to enter 10 as the user level value.

Don’t forget to click on the Go button to insert the data.

That’s all, you can now visit the WordPress admin area and log in with your newly added admin user.

Change a WordPress Username via PhpMyAdmin

You may have noticed that while WordPress allow you to change user’s full name or nickname, it does not allow you to change the username.

Now a lot of users end up choosing usernames during the installation that they may later want to change. Here is how you can do this via phpMyAdmin.

Note: there is an easier way to change WordPress username using a plugin.

First, you need to launch the phpMyAdmin from your hosting account’s cPanel dashboard. After that, you need to select your WordPress database.

PhpMyAdmin will show your WordPress database tables. You need to click on the ‘Browse’ link next to wp_users table.

Browse user table

This table will now list all the registered users on your website. Click on the edit link next to the username that you want to change.

Edit user data via phpMyadmin

PhpMyAdmin will now show you the user data. You need to locate the user_login field and change the value to the username you want to use.

Change WordPress username in phpMyAdmin

Don’t forget to click on the Go button to save your changes. You can now visit your website and login with your new username.

Other Useful PhpMyAdmin Tricks

Your WordPress database is the engine behind your website. With phpMyAdmin you can tweak settings to improve performance, fix issues, or simply change things that cannot be changed from inside WordPress admin area.

Following are just a few more tricks you can use with phpMyAdmin.

Securing your WordPress Database

Before we get into this, we want to emphasize that every site can be hacked. However, there are certain measures you can take to make it a little harder.

First thing that you can do to is to change WordPress database prefix. This can significantly reduce the chances of SQL injection attacks on your WordPress database because often hackers target sites in masses where they are targeting the default wp_ table prefix.

You should always choose a strong username and password for your MySQL user. This will make it difficult for someone to get access to your WordPress database.

For WordPress security, we strongly recommend that you use Sucuri. It is the best WordPress security plugin that would catch any attempts at MySQL injection even before it reaches your website.

We hope that this guide helped you learn WordPress database management and how to use phpMyAdmin.

If you are the sort of person who likes to learn how things work behind the scenes, then you would love our guides on how WordPress actually works and how WordPress plugins work.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post Beginner’s Guide to WordPress Database Management with phpMyAdmin appeared first on WPBeginner.

Clean up Your WordPress Database With SQL (2019 Guide)

After years of usage, your WordPress database can contain weird characters, be filled with data you don't need anymore, and so on. In this article, you will learn about SQL queries to clean up your WordPress database.

Two things to note: First, any of these queries should be preceded by a backup of your whole database. Secondly, don't forget to replace the wp_ table prefix by the prefix used on your WordPress website install, otherwise, the queries won't work.