WP Newsify
Weekly News About WordPress
  • Home
  • WordPress
    • Premium Themes
    • Free Themes
    • Plugins
    • Tutorials
    • Hosting
  • Blog
  • Services
    • Testimonials
  • Exclusive Deals
  • About
    • Privacy Policy
    • Terms and Conditions
    • Press
  • Contact

Follow Us

Database Management

Beginner’s Guide: How to Get the Most from Database Management

Daniel Pintilie Blog

FacebookTweetPinLinkedIn

Did you know that you can add or remove users from a place other than your WordPress dashboard? Did you know that you can disable themes and plugins or fix errors outside of your admin dashboard?

Managing your site from the dashboard is simple and intuitive; it’s one of the reasons behind WordPress’s huge expansion. However, you can accomplish a lot of tasks by accessing your site’s database, usually via phpMyAdmin.

Many users are reluctant to handle databases. Manipulating a database, unlike browsing a file extension database, requires an average knowledge level, and the chances of making a critical mistake are high.

This article is for you if you want to learn more about WordPress databases and how to get the most from them. Read it carefully to learn some tricks that could help you in stressful situations.

What is a WordPress Database?

Before delving deeper into this matter, let me introduce the concept of a WordPress database. In plain English, a WordPress database is an entity that stores all the data required to make the site functional. It handles the WordPress files to provide the desired output.

MySQL is the open-source software used by WordPress for database management, and it allows users to perform a vast array of operations. Bear in mind that you can’t create a WordPress site without creating a database. You can learn SQL through Intellipaat SQL training to enhance your skill.

A default WordPress database contains 12 tables:

A default WordPress database contains 12 tables.
Credit – codex.wordpress.org
  1. wp_commentmeta stores data related to the comments and commenters
  2. wp_comments stores the comments
  3. wp_links stores data related to links (a deprecated feature useful for creating blogrolls)
  4. wp_options stores what you have done in the Settings panel (Writing, Reading, Discussion, Privacy, etc.)
  5. wp_postmeta stores metadata for your posts
  6. wp_posts stores your posts, pages, and the navigation menu
  7. wp_terms stores the categories and tags
  8. wp_termmeta stores metadata for each term
  9. wp_term_relationships stores the associations from wp_terms (associations of posts with categories and tags)
  10. wp_term_taxonomy stores the taxonomy (link, category, or tag) from wp_terms
  11. wp_usermeta stores metadata for each user
  12. wp_users stores the list of users.

There is no malfunction if your site’s database contains more tables. Your plugins have probably just created new tables.

How to Manipulate a Database

How to Manipulate a Database.

Working with databases isn’t rocket science, but any mistake you make is almost impossible to repair. My recommendation is to make a complete backup of your database before working with it. Don’t skip this step!

But if you’re testing things, whether you’re a beginner who still experiments with settings in WordPress or a developer who tests a new plugin/theme, you will need to reset your WordPress site. In that case, we suggest the free WP Reset plugin that will enable you to clean the database and start over in a matter of a few seconds.

Use the phpMyAdmin tool to access your database; top-quality hosting providers will give you access to this tool, which streamlines the management of MySQL databases. Here is a list of operations you can perform with phpMyAdmin.

1. Back Up a Site’s Database

You must save the WordPress files and the database to have a functional backup copy of your site. It’s worthless to mention how important is to back up your site. You can do it with a plugin or manually. In the latter case, use an FTP client to save all the WordPress files and follow the steps below to save your site’s database.

Open the phpMyAdmin panel, and you will see the Database tab. Select your site’s database and click Check All to select all the files.

Back Up a Site’s Database

Next, click Export in the upper menu, chose SQL as the format, and hit Go. You have just saved your site’s database.

Click Export in the upper menu, chose SQL as the format, and hit Go.

HINT: You may have more databases in the phpMyAdmin tab, and you might not know which is your site’s database. In this case, head to your wp-config.php file and search for this line:

define(‘DB_NAME’, ‘database_name’);

The second parameter is the name of the database you need to back up so you can save the correct database.

2. Fix Errors

“Error establishing a database connection” is a message that terrifies WordPress users. Multiple factors can generate this error, but you can fix it from the phpMyAdmin panel by using a backup copy of your site’s database. The team at 000webhost.com did a splendid job writing a complete guide explaining the ins and outs of the “Error establishing a database connection” message.

3. Optimize and Repair a Database

Optimize and Repair a Database.

This is a useful, basic task. Select the database, check all files, and select Optimize/Repair from the drop-down menu. Repair will patch the tables, and Optimize will defragment the tables, increasing the site’s loading speed.

4. Deactivate Plugins

One of the WordPress admin’s worst nightmares is not being able to access the dashboard. Good practice says that deactivating all plugins could resolve your issue. However, if you can’t access the dashboard, you can’t deactivate plugins. In this case, head to your phpMyAdmin tool and check your site’s database.

Locate the wp_options table and click on it.

Good practice says that deactivating all plugins could resolve your issue.

You will see a lot of entries, including active_plugins. Click Edit, and it will display a new panel, including a text area with the plugins installed.

 You will see a lot of entries, including active_plugins.

Delete all of them and add this message:

a:0:{}

5. Reset a Password

Resetting your password is mandatory when you are not able to access your dashboard. Also, it’s recommended to change it from time to time. You can do so with the phpMyAdmin tool by selecting your database and editing the wp_users table.

Once you click Browse, it will display the list of users. Click on the one who needs a password reset, go to the user_pass field, and change the Function type to MD5. Replace the old password in the Value area with the new one.

Replace the old password in the Value area with the new one.

It’s done, you set a new password!

6. Change a Username

You can change a username directly from your site’s database. Check the wp_users table (see above) and click on the username you want to change. All you need to do is to replace the user_login value with the new username.

Replace the user_login value with the new username.

Wrapping Up

Mastering WordPress databases aren’t for beginners, but it’s certainly not an exclusive right of developers. Even a non-coder can learn how to manipulate WordPress databases. These were only a few tricks to entice you to give it a try. Altogether, you can do way more things with your site’s database. Just remember to back up your site.

Are you are interested in learning more about WordPress databases? Did you find it interesting learning how to perform various actions with the help of phpMyAdmin? Please share your ideas with us!

  • Author
  • Recent Posts
Daniel Pintilie
Follow Me
Daniel Pintilie
Daniel is a writer on WP Newsify, a blogger & Internet marketer ready to create valuable, actionable and interesting content for your website. He is in love with WordPress and Internet Marketing. You can get in touch with him by visiting his portfolio – Daniel2Writing.com.
Daniel Pintilie
Follow Me
Latest posts by Daniel Pintilie (see all)
  • The Complete Guide to Selling Your WordPress Blog - April 19, 2019
  • 20+ Great WordPress Premium Theme Providers of 2019 - January 15, 2019
  • The Pros and Cons of Selling WordPress Services on Fiverr - October 15, 2018
FacebookTweetPinLinkedIn

Where Should We Send
Your WordPress Deals & Discounts?

Subscribe to Our Newsletter and Get Your First Deal Delivered Instant to Your Email Inbox.

Thank you for subscribing.

Something went wrong.

We respect your privacy and take protecting it seriously

Daniel Pintilie

→ Daniel Pintilie

How to Master Time Management Skills for WordPress Bloggers Grimm Lite: Game Development Studio Free WordPress Theme – Full Review

Related Posts

a street sign on a pole in front of a building wordpress privacy plugin, gdpr compliance, user consent form

Blog

How to secure student data in WordPress (FERPA and GDPR compliance)

turned on monitoring screen ferpa compliance, gdpr policy, student data security

Blog

Beyond passwords: The benefits of two-factor authentication for website owners

Virtual meeting

Blog

How educators can use WordPress membership sites

Boost Your Website With Our WordPress Tips

Receive Exclusive Content & Discounts in Your Inbox

Thank you for subscribing.

Something went wrong.

We hate SPAM and we never send it!

Recent Posts

  • How to secure student data in WordPress (FERPA and GDPR compliance)
  • Beyond passwords: The benefits of two-factor authentication for website owners
  • How educators can use WordPress membership sites
  • What Does NPC Mean? Gaming Term & Meme Explained
  • Which is better MEMU or NOX?
WP Newsify

The WordPress® trademark is the intellectual property of the WordPress Foundation. Uses of the WordPress® name in this website are for identification purposes only and do not imply an endorsement by WordPress Foundation. WebFactory Ltd is not endorsed or owned by, or affiliated with, the WordPress Foundation.

Recent Posts

  • How to secure student data in WordPress (FERPA and GDPR compliance)
  • Beyond passwords: The benefits of two-factor authentication for website owners
  • How educators can use WordPress membership sites
  • What Does NPC Mean? Gaming Term & Meme Explained
  • Which is better MEMU or NOX?

Categories

  • Blog (726)
  • Free Themes (13)
  • Hosting (15)
  • Plugins (157)
  • Premium Themes (41)
  • Tutorials (119)
  • Uncategorized (35)
  • WordPress (148)

Pages

  • About WP Newsify
  • Contact
  • Exclusive Deals
  • Press
  • Privacy Policy
  • Terms and Conditions
  • Testimonials
© WP Newsify 2017-2021. Operated by WebFactory Ltd Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to WP Newsify with appropriate and specific direction to the original content. Powered by WordPress
Like every other site, this one uses cookies too. Read the fine print to learn more. By continuing to browse, you agree to our use of cookies.X