Dọn dẹp Database Wordpress với lệnh SQL đơn giản

07/11/2015 93 Comment(s) Tin tức phụ kiện,

Chắc hẳn trong chúng ta nếu ai đã từng dùng mã nguồn Wordpress thì đều thấy được sự nặng nền của nó sau một khoảng thời gian dài mình đã cài đặt và gỡ bỏ biết bao nhiêu là gói mở rộng, hay những bài viết được lưu tạm khi đăng bài... nó làm cho Website chúng ta trở nên nặng nề và chậm chạp rất nhiều. Sau đây mình sẻ hướng dẫn các bạn cách dọn rác trông Database cho Wordpress bằng lệnh SQL.

Đối với những ai không am hiểu nhiều về lệnh SQL thì cũng rất lo lắng khi dùng lệnh này vì nó nguy hiểm đến 1 hệ dữ liệu của chúng ta. Nguy hiểm là vậy nhưng hiệu quả của nó rất tốt, chỉ cần một chút hiểu biết SQL là bạn sẽ dễ dàng sử dụng nó trong bất kỳ trường hợp nào. Tại đây mình chỉ hướng dẫn bạn cách xóa các cookies không cần thiết chứa trong bảng wp_options vì nó có thể chiếm vài MB của database nếu blog của bạn hoạt động lâu rồi.

Đầu tiên hãy truy cập vào PhpMyAdmin, chọn database mà bạn muốn dọn dẹp bên cột trái và ấn nút SQL phía trên để bắt đầu thực thi lệnh.

Sau đó copy đoạn này vào bên trong khung chạy lệnh rồi ấn nút Go, nếu bạn dùng prefix database khác với wp_ thì sửa lại nhé. Nó có hỏi thì thì cứ Ok.

DELETE FROM `wp_options` WHERE `option_name` LIKE '%_transient_%'

Bây giờ bạn sẽ nhận được thông báo màu xanh hiển thị số dòng mà nó đã xóa đi trong databse của bạn, ít hay nhiều tùy theo độ lớn database của bạn.

 

Tham khảo: Thach Pham

93 Comment(s)

Lisa Rose:
03/10/2025, 09:50:25 PM, levited.com
Reply

I like what you guys are up too. This type of clever work and exposure! Keep up the good works guys I've included you guys to my blogroll.

pHqghUme:
09/04/2026, 12:51:18 AM

1

Heather Campos:
07/10/2025, 12:32:21 AM, antibact.sbs
Reply

Hi! I've been following your blog for some time now and finally got the bravery to go ahead and give you a shout out from Dallas Tx! Just wanted to say keep up the fantastic job!

pHqghUme:
09/04/2026, 12:51:19 AM

1

Heather Campos:
07/10/2025, 03:52:03 AM, antibact.sbs
Reply

Hi! I've been following your blog for some time now and finally got the bravery to go ahead and give you a shout out from Dallas Tx! Just wanted to say keep up the fantastic job!

pHqghUme:
09/04/2026, 12:51:21 AM

1

John Johnson:
10/10/2025, 03:36:11 AM, dapoxetined.org
Reply

I just could not leave your site before suggesting that I extremely loved the usual information an individual provide in your guests? Is gonna be again often in order to inspect new posts

pHqghUme:
09/04/2026, 12:51:22 AM

1

Jessica Carter:
10/10/2025, 03:25:03 PM, amoxibest.top
Reply

I visited various web sites however the audio feature for audio songs current at this web site is actually excellent.

pHqghUme:
09/04/2026, 12:51:24 AM

1

Charles Henderson:
11/10/2025, 12:41:09 AM, medshop24h.top
Reply

You made some decent points there. I looked on the net for more info about the issue and found most people will go along with your views on this site.

pHqghUme:
09/04/2026, 12:51:25 AM

1

Carly Ruiz:
11/10/2025, 08:56:55 PM, tadalah.com
Reply

Very efficiently written story. It will be valuable to anyone who employess it, as well as me. Keep doing what you are doing - looking forward to more posts.

pHqghUme:
09/04/2026, 12:51:27 AM

1

Colleen Roth:
12/10/2025, 04:53:42 AM, sildenafiil.cc
Reply

Hey there! I've been reading your web site for some time now and finally got the bravery to go ahead and give you a shout out from Austin Texas! Just wanted to tell you keep up the excellent work!

pHqghUme:
09/04/2026, 12:51:29 AM

1

William Carrillo:
12/10/2025, 04:05:17 PM, propeciaa.sbs
Reply

Ahaa, its good dialogue concerning this post at this place at this webpage, I have read all that, so now me also commenting at this place.

pHqghUme:
09/04/2026, 12:51:30 AM

1

David Morris:
12/10/2025, 10:33:16 PM, sildenaguide.com
Reply

Hi, I do believe this is a great web site. I stumbledupon it ;) I'm going to come back once again since I bookmarked it. Money and freedom is the best way to change, may you be rich and continue to guide others.

pHqghUme:
09/04/2026, 12:51:32 AM

1

Maureen Thornton:
28/10/2025, 02:14:45 AM, zithromax24h.sbs
Reply

I’ll right away grab your rss as I can’t in finding your email subscription link or e-newsletter service. Do you have any? Please let me understand in order that I may just subscribe. Thanks.

pHqghUme:
09/04/2026, 12:51:33 AM

1

April Jones:
29/10/2025, 07:34:18 AM, kamagras.shop
Reply

I visited many blogs except the audio feature for audio songs present at this site is actually superb.

pHqghUme:
09/04/2026, 12:51:35 AM

1

Dawn Douglas:
07/11/2025, 02:57:49 AM, sildenawin.shop
Reply

I am sure this paragraph has touched all the internet visitors, its really really fastidious paragraph on building up new website.

pHqghUme:
09/04/2026, 12:51:39 AM

1

Sarah Watkins:
07/11/2025, 06:16:27 PM, kamagradirect.shop
Reply

Thank you for the auspicious writeup. It in fact was a amusement account it. Look advanced to more added agreeable from you! By the way, how could we communicate?

pHqghUme:
09/04/2026, 12:51:40 AM

1

Karen Romero:
09/11/2025, 05:19:59 PM, tadalix.shop
Reply

I am sure this post has touched all the internet viewers, its really really good article on building up new webpage.

pHqghUme:
09/04/2026, 12:51:42 AM

1

Tiffany Martin:
13/11/2025, 11:12:17 PM, ivermactin.sbs
Reply

I conceive other website owners should take this site as an example, very clean and great user friendly design and style.

pHqghUme:
09/04/2026, 12:51:43 AM

1

Rebecca Lane:
28/11/2025, 07:13:09 AM, avanafil.online
Reply

It's great that you are getting ideas from this article as well as from our argument made here.

pHqghUme:
09/04/2026, 12:51:47 AM

1

Nicole Ibarra:
28/11/2025, 08:24:05 PM, bupropion150mg.shop
Reply

Ahaa, its good dialogue on the topic of this article at this place at this webpage, I have read all that, so at this time me also commenting here.

Sheila Bright:
30/11/2025, 07:35:19 AM, acyclovir-400-mg.store
Reply

Ahaa, its nice conversation concerning this piece of writing here at this web site, I have read all that, so now me also commenting here.

Daniel Taylor:
03/12/2025, 07:03:46 PM, playastronaut.cc
Reply

I am sure this piece of writing has touched all the internet users, its really really good article on building up new blog.

Cindy Bryan:
06/12/2025, 07:51:15 PM, zolomeds.shop
Reply

I am truly grateful to the holder of this website who has shared this fantastic post at here.

Derek Wood:
07/12/2025, 05:11:53 AM, fluco.store/fluconazole-cream.html
Reply

magnificent issues altogether, you simply won a new reader. What might you suggest about your post that you made some days ago? Any positive?

Karen White:
08/12/2025, 11:11:20 PM, furocare.online/furosemide-40-mg.html
Reply

Thank you for the auspicious writeup. It in fact was a amusement account it. Look advanced to more added agreeable from you! By the way, how could we communicate?

Adam Mcgee:
09/12/2025, 12:56:52 PM, doxycare.shop/doxycycline-pill.html
Reply

Ahaa, its nice conversation concerning this paragraph at this place at this blog, I have read all that, so at this time me also commenting at this place.

Heather Lopez:
30/01/2026, 10:37:06 PM, medshop24h.top/lamotrigine
Reply

I visited many websites however the audio feature for audio songs current at this web page is genuinely superb.

Terri Jackson:
31/01/2026, 05:50:30 AM, propeciaa.sbs/avodart.html
Reply

Everyone loves what you guys tend to be up too. This sort of clever work and reporting! Keep up the great works guys I've included you guys to my own blogroll.

Ryan Green:
Reply

Ahaa, its good conversation concerning this article here at this webpage, I have read all that, so now me also commenting at this place.

Taylor Jackson:
02/02/2026, 01:27:59 AM, kamagras.shop/cialis
Reply

I will right away grasp your rss as I can not to find your email subscription link or e-newsletter service. Do you have any? Please permit me know so that I could subscribe. Thanks.

Mariah Graham:
Reply

I’ll right away grab your rss as I can not to find your email subscription link or newsletter service. Do you have any? Kindly permit me recognize so that I may just subscribe. Thanks.

Stephanie Simpson:
04/02/2026, 07:50:13 PM, metamedline.shop
Reply

Hi there, I read your blogs on a regular basis. Your humoristic style is awesome, keep doing what you're doing!

Kevin Beard:
05/02/2026, 11:32:50 PM, gastromedix.shop/domperidone.html
Reply

Way cool! Some very valid points! I appreciate you penning this article and the rest of the website is also really good.

Rodney Sutton:
14/02/2026, 05:15:07 AM, arthromedix.online/allopurinol.html
Reply

These are really impressive ideas in about blogging. You have touched some pleasant factors here. Any way keep up wrinting.

Angela Jones:
14/02/2026, 06:24:54 PM, minoximed.online/dutasteride.html
Reply

Great work! That is the kind of information that should be shared around the internet. Shame on the seek engines for not positioning this post higher! Come on over and consult with my website . Thank you =)

pHqghUme:
09/04/2026, 12:52:28 AM, www.example.com
Reply

1

Cheryl Harris:
10/04/2026, 07:10:36 AM, gastromedix.shop/misoprostol.html
Reply

Amazing! This blog looks just like my old one! It's on a entirely different topic but it has pretty much the same layout and design. Superb choice of colors!

Shannon Cook:
14/04/2026, 06:53:49 AM, edmedix.com
Reply

You've made some decent points there. I looked on the internet for additional information about the issue and found most people will go along with your views on this site.

Nicole Robinson:
14/04/2026, 08:13:56 PM, tadaline.com
Reply

If you desire to obtain a good deal from this paragraph then you have to apply such methods to your won weblog.

Arthur Delgado:
16/04/2026, 05:55:06 AM, edmedix.com/viagra.html
Reply

I really like it whenever people get together and share thoughts. Great site, continue the good work!

Kevin Jackson:
16/04/2026, 05:43:45 PM, edmedix.com/viagra-pills.html
Reply

always i used to read smaller articles which also clear their motive, and that is also happening with this paragraph which I am reading at this time.

Wayne Flores:
16/04/2026, 10:51:14 PM, minoximed.online
Reply

Wow, this piece of writing is good, my younger sister is analyzing these kinds of things, therefore I am going to inform her.

Chelsea Garrett:
17/04/2026, 03:44:28 AM, edmedix.com/sildenafil-citrate.html
Reply

Rattling informative and great anatomical structure of written content, now that's user friendly (:.

Carol Campbell:
17/04/2026, 08:48:56 AM, cilalisez.com
Reply

As far as Adobe is concerned the bug that causes Shockwave Flash to crash in Chrome has been fixed.

Mark Small:
17/04/2026, 01:43:00 PM, edmedix.com/kamagra.html
Reply

Hey! Someone in my Facebook group shared this website with us so I came to take a look. I'm definitely loving the information. I'm bookmarking and will be tweeting this to my followers! Exceptional blog and excellent design.

Jeffrey Odonnell:
17/04/2026, 06:21:08 PM, kamagras.shop/zudena
Reply

Ahaa, its fastidious dialogue concerning this post here at this webpage, I have read all that, so at this time me also commenting here.

Kyle Green:
18/04/2026, 02:01:29 AM, cilalisez.com/cialis-generic.html
Reply

I needed to thank you for this excellent read!! I certainly enjoyed every bit of it. I've got you saved as a favorite to check out new stuff you

Michael Figueroa:
18/04/2026, 01:26:14 PM, edmedix.com/viagra-for-men.html
Reply

I am sure this paragraph has touched all the internet people, its really really fastidious paragraph on building up new website.

Elizabeth Moody:
18/04/2026, 06:17:52 PM, cilalisez.com/tadalafil-20mg.html
Reply

Hi! I simply want to give you a big thumbs up for your great information you have right here on this post. I’ll be coming back to your blog for more soon.

Catherine Ross:
19/04/2026, 05:39:46 AM, edmedix.com/viagra-generic.html
Reply

Hello, Neat post. There’s a problem along with your web site in internet explorer, would test this? IE nonetheless is the marketplace leader and a big component of people will miss your excellent writing due to this problem.

Matthew Bell:
Reply

I needed to thank you for this good read!! I definitely enjoyed every little bit of it. I have you saved as a favorite to check out new things you

Michael Larson:
21/04/2026, 12:19:19 AM, cenforce.online
Reply

I will right away seize your rss feed as I can’t in finding your e-mail subscription link or newsletter service. Do you have any? Please permit me understand in order that I may subscribe. Thanks.

Erica Phillips:
21/04/2026, 06:11:53 AM, vidalisted.shop
Reply

You made some good points there. I looked on the web for more information about the issue and found most people will go along with your views on this web site.

Angela Callahan:
22/04/2026, 01:53:03 AM, voriconazole.online
Reply

Santonio Holmes and Miles Austin: This trio would have won your fantasy league in 2009.

Michael Lucas:
22/04/2026, 06:17:27 AM, orlistate.online
Reply

It's awesome for me to have a website, which is useful in favor of my know-how. thanks admin

Gabriel Rodgers:
24/04/2026, 08:07:56 PM, cilalisez.com/tadalafil-5mg.html
Reply

Ahaa, its fastidious conversation concerning this post at this place at this web site, I have read all that, so at this time me also commenting here.

Susan Taylor:
25/04/2026, 06:50:22 AM, fluco.store/fluconazole-200-mg.html
Reply

Wow! This blog looks exactly like my old one! It's on a entirely different subject but it has pretty much the same page layout and design. Superb choice of colors!

Michael Molina PhD:
25/04/2026, 12:15:32 PM, edpharmahub.com
Reply

Hi there! I'm at work browsing your blog from my new iphone 3gs! Just wanted to say I love reading your blog and look forward to all your posts! Carry on the outstanding work!

Stephanie Mora:
25/04/2026, 06:32:11 PM, cenforce.online/cenforce-100mg.html
Reply

I’ll immediately take hold of your rss as I can not to find your e-mail subscription hyperlink or e-newsletter service. Do you’ve any? Kindly allow me know so that I could subscribe. Thanks.

Diana Simmons:
25/04/2026, 11:00:51 PM, cilalisez.com/cialis.html
Reply

Ahaa, its good conversation concerning this article here at this web site, I have read all that, so now me also commenting at this place.

Adam Pratt:
27/04/2026, 05:06:06 AM, cenforce.online/cenforce-200.html
Reply

I will immediately grasp your rss feed as I can't to find your email subscription hyperlink or e-newsletter service. Do you have any? Please allow me understand so that I may just subscribe. Thanks.

Angela Diaz:
28/04/2026, 07:00:47 PM, edpharmahub.com/viagra
Reply

I simply could not leave your website before suggesting that I actually enjoyed the usual info a person supply on your guests? Is gonna be again regularly in order to inspect new posts

Mary Wolfe:
04/05/2026, 11:08:13 PM, cilalisez.com/tadalafil-generic.html
Reply

Everyone loves what you guys are usually up too. This kind of clever work and exposure! Keep up the fantastic works guys I've added you guys to our blogroll.

Kenneth Cole:
05/05/2026, 07:54:29 AM, edpharmahub.com/sildenafil
Reply

It's very effortless to find out any matter on web as compared to books, as I found this paragraph at this web page.

Albert Calderon:
05/05/2026, 04:26:40 PM, cenforce.online/cenforce-100.html
Reply

Excellent way of telling, and pleasant article to get facts about my presentation subject, which i am going to deliver in university.

James Griffin:
06/05/2026, 01:04:35 AM, cilalisez.com/tadalafil-10mg.html
Reply

These are truly wonderful ideas in about blogging. You have touched some fastidious factors here. Any way keep up wrinting.

Sandra Moore:
06/05/2026, 09:37:58 AM, vidalisted.shop/vidalista-20.html
Reply

It's awesome to pay a quick visit this website and reading the views of all friends regarding this piece of writing, while I am also keen of getting knowledge.

Kyle Lang:
06/05/2026, 07:24:32 PM, edpharmahub.com/abhigra
Reply

Chemical stains additionally have to penetrate into the concrete floor to react with the lime in the concrete.

Brandon Lopez:
07/05/2026, 12:34:02 AM, cenforce.online/cenforce-150.html
Reply

Hi, I do believe this is an excellent blog. I stumbledupon it ;) I may come back yet again since I bookmarked it. Money and freedom is the best way to change, may you be rich and continue to guide others.

Stephanie Ortiz:
07/05/2026, 10:12:35 AM, edpharmahub.com/avanafil
Reply

I wanted to thank you for this great read!! I certainly loved every bit of it. I’ve got you bookmarked to look at new things you post…

Kristen Andrews:
07/05/2026, 08:36:53 PM, cilalisez.com/tadalafil-20-mg.html
Reply

I will right away grab your rss feed as I can not find your e-mail subscription hyperlink or e-newsletter service. Do you have any? Kindly permit me recognise in order that I could subscribe. Thanks.

Joshua Ross:
08/05/2026, 11:52:59 AM, edpharmahub.com/cenforce
Reply

Amazing! This blog looks exactly like my old one! It’s on a completely different topic but it has pretty much the same page layout and design. Wonderful choice of colors!

Brett Robertson:
09/05/2026, 04:09:49 PM, cenforce.online/cenforce-200mg.html
Reply

Hello. fantastic job. I did not imagine this. This is a great story. Thanks!

Frank Melendez:
12/05/2026, 05:34:53 PM, slimgogo.com
Reply

I visited several blogs but the audio feature for audio songs existing at this web site is actually marvelous.

Christopher Brown:
13/05/2026, 06:28:46 PM, edpharmahub.com/dapoxetine
Reply

Hello, i think that i saw you visited my web site thus i came to “return the favor”.I’m attempting to find things to improve my web site!I suppose its ok to use a few of your ideas!

Daniel Winters:
14/05/2026, 07:48:41 AM, slimgogo.com/de
Reply

Everyone loves it when people get together and share opinions. Great site, stick with it!

Kenneth Burton:
14/05/2026, 03:29:05 PM, edpharmahub.com/kamagra
Reply

I believe you have remarked some very interesting details, regards for the post.

Rebekah Moran:
17/05/2026, 07:05:51 PM, edpharmahub.com/levitra
Reply

Way cool! Some very valid points! I appreciate you writing this post and also the rest of the site is very good.

Diane Jensen:
18/05/2026, 02:42:36 AM, edpharmahub.com/revatio
Reply

There is definately a lot to find out about this subject. I really like all of the points you made.

Shawn Johnson:
18/05/2026, 08:35:04 AM, edpharmahub.com/stendra
Reply

I like it when people get together and share thoughts. Great site, keep it up!

Steven Freeman:
18/05/2026, 06:36:12 PM, edpharmahub.com/tadalafil
Reply

Ahaa, its fastidious conversation regarding this paragraph at this place at this weblog, I have read all that, so now me also commenting at this place.

William Perkins:
19/05/2026, 12:18:29 AM, edpharmahub.com/vardenafil
Reply

These are in fact wonderful ideas in on the topic of blogging. You have touched some good things here. Any way keep up wrinting.

Justin Combs:
19/05/2026, 08:18:29 AM, edpharmahub.com/vidalista
Reply

It's very straightforward to find out any matter on web as compared to books, as I found this piece of writing at this web page.

Benjamin Davidson:
19/05/2026, 01:47:24 PM, edpharmahub.com/zudena
Reply

It's very straightforward to find out any topic on net as compared to textbooks, as I found this article at this web page.

Sharon Cooper:
19/05/2026, 07:02:40 PM, easyslimnow.com
Reply

Some really nice stuff on this website, I enjoy it.

George Sanchez:
20/05/2026, 12:19:55 AM, doxyatlas.com
Reply

Greetings! Very useful advice within this article! It's the little changes that make the most significant changes. Many thanks for sharing!

Ann Jones:
20/05/2026, 05:56:49 AM, rehairhub.com
Reply

I am sure this article has touched all the internet users, its really really nice article on building up new blog.

Jamie Martin:
20/05/2026, 03:16:33 PM, slimgogo.com/es
Reply

I really like what you guys are up too. This sort of clever work and reporting! Keep up the great works guys I've incorporated you guys to my own blogroll.

Angela Chavez:
21/05/2026, 08:16:29 AM, easyslimnow.com/orlistat
Reply

You completed a few good points there. I did a search on the issue and found mainly folks will have the same opinion with your blog.

Kristine Lopez:
21/05/2026, 03:52:35 PM, rehairhub.com/avodart
Reply

Terrific work! This is the type of info that are meant to be shared around the web. Shame on the search engines for now not positioning this put up higher! Come on over and visit my website . Thanks =)

Stacy Burgess:
21/05/2026, 11:22:00 PM, easyslimnow.com/ozempic
Reply

I'll right away grab your rss feed as I can't find your email subscription link or e-newsletter service. Do you have any? Kindly allow me realize in order that I may just subscribe. Thanks.

Samantha Vasquez:
22/05/2026, 08:59:20 PM, doxyatlas.com/doxycycline-price
Reply

This page truly has all of the information I needed concerning this subject and didn't know who to ask.

Morgan Ross:
24/05/2026, 07:40:21 AM, doxyatlas.com/doxycycline
Reply

It takes place when two opposing Pokemon inevitably cross each other's paths on the board.

Nicole Mccormick:
24/05/2026, 05:26:31 PM, rehairhub.com/minoxidil
Reply

Hi, I do think this is an excellent website. I stumbledupon it ;) I may revisit yet again since I bookmarked it. Money and freedom is the greatest way to change, may you be rich and continue to guide others.

Brittany Curtis:
25/05/2026, 05:45:50 AM, easyslimnow.com/semaglutide
Reply

I enjoy what you guys tend to be up too. This type of clever work and coverage! Keep up the amazing works guys I've included you guys to my own blogroll.

Write a Comment