How can I bulk delete all images in Wordpress?

margarita

New member
Joined
Mar 11, 2014
Messages
67
Points
0
Hello,

I have about 8000 images on a blog and when I created a clone blog on a new web hosting to use existed word press theme and removed all old posts, avoid duplicated content from original blog.

But in wp-admin, i still have seen 8000 images in media section, I want to remove all images to upload new images to this new blog. Is it possible?

Please suggest me

Thanks
 

elcidofaguy

Well-known member
Joined
Jan 13, 2015
Messages
1,281
Points
113
Hi Margarita,

Here is a quick fix...

Logon to your webhosts cpanel and use file explorer to navigate to your websites image folder where you can just delete them... The path will be something like:

website name | wp-content | uploads | Year | Month

With this way you can group select delete as with windows file explorer....

Hope that helps!
 

Hassan

New member
Joined
Nov 11, 2014
Messages
706
Points
0
Backup First Locate your WordPress database in phpMyAdmin, then run this SQL command to delete ALL attachments:

Code:
DELETE FROM `wp_posts` WHERE `post_type` = "attachment"
 

elcidofaguy

Well-known member
Joined
Jan 13, 2015
Messages
1,281
Points
113
Dear Margarita

Here is a video outlining the steps as per Hassan's excellent post above.... which will complete the job of removing the images with using phpMyAdmin in order to remove the dud entries in WP database...

Best of Luck!

 
Latest threads
Replies
0
Views
590
Replies
2
Views
789

Referral contests

Referral link for :

Sponsors

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top