In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail what the operation commands of the WordPress database are, and the editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
WordPress database
PhpMyAdmin is the first choice for many DBAs [database administrators] to create databases, but not everyone likes to use phpMyAdmin at the level of focusing on SQL query statements.
You should already know that WordPress uses the MySQL database, and you need to log in before using it. You can log in by entering the following command on the command line:
Mysql-u [user_name]-p-D [database_name]
After logging in, you can view all the data tables, using the following command:
Desc [table_name]
Also note that the table prefix is the default wp, which stands for WordPress, so make sure your prefix is correct if you use a different prefix.
Let's browse through the data tables sorted in alphabetical order.
1) wp_options
Configuration table, which holds all the configuration information:
Title title
Tagline tag
Timezone time zone
All the dashboards display a collection of databases stored in this particular table.
2) wp_users
User table, as can be seen from the name of the table, this table stores all registered user information, including the following information:
Log-in ID user ID
Password after Encrypted password hash calculation
E-mail ID subscriber email
Contact numbers contact number
Registration date and time registration time
Display name display name
Status statu
Activation key activation code
3) wp_usermeta
The user extension information table stores some extended user information, such as the last name last_name, which is not stored in the wp_users table.
The following fields are the differences in this table:
Meta_key
Meta_value
4) wp_posts
Article table, this table stores all the articles and pages of the site, including the historical version, and the navigation menu is also stored in this table. Different article types are distinguished by using the post_type field.
5) wp_postmeta
The article property sheet stores metadata for all articles, such as tag data generated by some SEO plug-ins.
6) wp_terms
The categories and tags corresponding to articles, links, and pages are stored in this table, often referred to as slug, whose value will be reflected in the hyperlink, which will eventually improve the effectiveness of Google spider search pages for optimization purposes.
7) wp_term_relationships
Attribute relationship table, which stores the mapping between [tags / categories] and [articles / pages].
8) wp_term_taxonomy
This table stores the mapping between taxonomy [Taxonomy] and term.
Translator's note:
Examples are as follows:
You have created a new article, which is classified as fruit, and the Taxonomy [taxonomy] of this article is called category by default.
You have created a new article, which is classified as vegetables (vegetable). The Taxonomy [taxonomy] of this article remains unchanged, but it is still called category.
At this point you want to create a series of articles about cars and don't want to confuse them in the original list of food articles.
Then you can first create a new post_type with a value of car and a Taxonomy of power.
Specific methods can be added in the official documentation, search for the use of the function register_post_type
Then add two articles, classified as battery and gas
In this way, there is a new mapping record in the table wp_term_taxonomy.
The SQL statement when querying for food is category= fruit
The SQL statement when querying a car is power=battery
9) wp_comments
It stores comments on all pages, including those that have not been approved, as well as other information filled in during comments; it is important to note that if you are using a third-party comment system such as Disqus, comments will not be stored in this table.
10) wp_commentmeta
Like other metadata tables, this table stores extended metadata for comments.
11) wp_links
This table stores custom link information and requires a link management [Links Manager] plug-in to be installed, although it is no longer recommended.
A few tips to modify the default user name
WordPress does not allow you to modify the user name, but you can do so by executing the SQL statement.
Modify the password
If you forget the administrator password, you can easily restore it by modifying the database. Note that the password must be digested by the MD5 hash algorithm.
Delete all spam comments
Sometimes spam comments can be a headache for you. You can use plug-ins like Akismet to monitor and manage them, but if you have a lot of spam comments, you can clean them up by using SQL.
Check the sources of spam comments
All in all, this article hopes to make novice administrators no longer confused about the database, although there are countless plug-ins available today, but do not use it blindly, you should first consider the easiest way to solve your needs.
This is the end of this article on "what are the operation commands of WordPress database?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.