Need WordPress database skills
Hi all,
WordPress has a wealth of plug-ins, themes, the main build a successful blog tool for the broad masses, WordPress blog is supported by MySQL, and in the process of writing the blog, sometimes have to involve some of the MySQL database operations, although plug-ins and code changes also help us solve the problem, but it is also treating the symptoms not the root cause of the rich, free, rational use of phpMyAdmin to carry out data operations are necessary. So can anybody suggest me some WordPress database skills. Thanks in advance,
Need WordPress database skills
Database backup for owners is very necessary, this network involves a lot of turmoil, Webmaster, if the site back up, then it can be restored in a short time together, let's will, your site also OVER, and, of course, you can also use the WP-DB-Backup plug-in implementation of the database backup is very convenient, WordPress users can install this plug-in and regularly back up data. All the best.
Need WordPress database skills
Wordpress strong interaction is also one of its advantages, this advantage could be been used by a lot of spam, but by a simple delete statement, we can solve this problem, execute this command:
Code:
DELETE from wp_comments WHERE comment_approved = '0 ';
So, all the junk ads can be deleted is completed. Check and reply.
Re: Need WordPress database skills
Wordpress in order to increase security, will be automatically generated is not easy to break a secret, however, the main Bo will also appear at times forget the password to happen, it is that we can, through phpmyadmin to re-modify the password, use the following command can be a :
Code:
UPDATE `wp_users` SET `user_pass` = MD5 ( 'PASSWORD') WHERE `wp_users`. `User_login` = `admin` LIMIT 1;
This password change successful. All the best.
Need WordPress database skills
As the WordPress domain name is stored in the database, so in order to bring new domain name and blog link, you must change the database, use the following command to modify:
Code:
UPDATE wp_options SET option_value = replace (option_value, 'http://www.oldsite.com', 'http://www.newsite.com') WHERE option_name = 'home' OR option_name = 'siteurl';
Use the following statement to replace all of the log of the relative URL (guid Globally Unique Identifier)
Code:
UPDATE wp_posts SET guid = replace (guid, 'http://www.oldsite.com', 'http://www.newsite.com');
Search wp_posts table and replace one of the URL, in order to ensure that no old URL exists:
Code:
UPDATE wp_posts SET post_content = replace (post_content, 'http://www.oldsite.com', 'http://www.newsite.com');
Need WordPress database skills
wordpress upgrade relatively fast, so do not have to upgrade another great blog, if the modification or upgrade a blog or other causes of data loss or damage, I hope you have a backup of the database, so you can back up the database into the database in order to cover the losses. You can also use it to "change the log properties" and other operations, on the whole, phpmyadmin function is very strong, it can help you make better use of Mysql database. All the best.