|
| ||||||||||
| Tags: blog, database, mysql, sql statement, wordpress |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Need WordPress SQL statement
In the past ten years, MySQL has become a popular database, while the WordPress blog using a MySQL database, although the use of plug-in can solve some problems, but to achieve certain specific tasks, to execute SQL statements in php MyAdmin is the most simple way I need some useful SQL statements used to solve some practical problems encountered. Please help. Thanks in advance. |
|
#2
| ||||
| ||||
| Need WordPress SQL statement
I(f you want to create a backup of the database, Go through the following methods can be simple backup database: Log in phpMyAdmin later. Choose your WordPress database, then click "Export" button, select a compression method (using gzip) and click the "executive" button, when prompted to download the browser when the point of "yes", the database file downloaded to the Local. Best of luck. |
|
#3
| |||
| |||
| Need WordPress SQL statement
WordPress2.6 later added a Post revisions feature, though a bit used, but i suggested to amended to increase the size of your database, we can choose to delete in bulk. Log in phpMyAdmin execute the following SQL statement after the bulk can be removed. Code: DELETE FROM wp_posts WHERE post_type = "revision"; |
|
#4
| ||||
| ||||
| Need WordPress SQL statement
After you have WordPress installed, admin account is created, and many people are wrong to use this account to write blog, until they realize that this is not a personal account. First of all you have to find your correct user name, use the following SQL statements can be found in your user ID. Code: SELECT ID, display_name FROM wp_users; Code: UPDATE wp_posts SET post_author = NEW_AUTHOR_ID WHERE post_author = OLD_AUTHOR_ID; |
|
#5
| ||||
| ||||
| Need WordPress SQL statement
Many people in order to protect their blog is not being black-out, using a very complex password, Although this is a good thing, but it will happen often forgotten administrator password thing. Of course, by e-mail can be sent to you WordPress link to reset your password, but if you can not access your e-mail address, then had to use the following SQL statements to reset your password. Code: UPDATE wp_users SET user_pass = MD5 ( 'PASSWORD') WHERE wp_users.user_login = 'admin' LIMIT 1; |
|
#6
| ||||
| ||||
| Need WordPress SQL statement
You may sometimes want to change your blog's domain name, but WordPress for your domain name will be stored in a database, so you want to use the following SQL statements to modify the. 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'; Code: UPDATE wp_posts SET guid = replace (guid, 'http://www.oldsite.com', 'http://www.newsite.com'); Code: UPDATE wp_posts SET post_content = replace (post_content, 'http://www.oldsite.com',
__________________ Grand Theft Auto 4 PC Video Game |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Need WordPress SQL statement" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is an Atomic Statement and how to use it? | JustBorN55 | Software Development | 4 | 04-02-2011 12:42 PM |
| How to use Else and Else If Statement in PHP? | Orton | Software Development | 5 | 05-03-2010 05:49 AM |
| How to use If statement in PHP? | Deabelos | Software Development | 4 | 09-02-2010 05:14 AM |
| what is wordpress? How to install Newer versions of wordpress. | Gill_christ | Technology & Internet | 3 | 21-05-2009 02:40 PM |
| What is the difference between while statement & do statement? | Athos | Software Development | 4 | 25-02-2009 07:52 PM |