{"id":3704,"date":"2017-07-06T17:21:26","date_gmt":"2017-07-06T17:21:26","guid":{"rendered":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?p=3704"},"modified":"2017-07-06T17:21:26","modified_gmt":"2017-07-06T17:21:26","slug":"automatically-delete-trash-wordpress","status":"publish","type":"post","link":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/automatically-delete-trash-wordpress\/","title":{"rendered":"How To Automatically Delete Trash In WordPress?"},"content":{"rendered":"<p>At times, there are a huge number of posts in Trash and you might want to delete all of them at once. In WordPress, the \u2018wp-config.php\u2019 function controls the time frame for which the data is stored in the WordPress trash folder. By editing the time frame in the \u2018wp-config.php\u2019 function you can reduce the number of days for which the data is stored in the trash folder. If you do this, there will be no need to check the trash folder for deleting the posts.<!--more--><\/p>\n<p><em>Here are the necessary steps for editing the time frame for wp-config.php function:<\/em><\/p>\n<p>WordPress sets a default time frame of 30 days for the data to be retained in the trash folder. If you check the wp-config.php file, you will come across the following:<\/p>\n<p>define( \u2018EMPTY_TRASH_DAYS\u2019, 30 ); \/\/ 30 days default<\/p>\n<p>You will have to change the time frame mentioned above. For instance, if you would like the WordPress system to delete the trash posts in 10 days, you can edit the entry mentioned above:<\/p>\n<p>\/* Automatically delete WordPress trash after 10 days *\/<\/p>\n<p>define( \u2018EMPTY_TRASH_DAYS\u2019, 10 );<\/p>\n<p>In the example given above, if you define the number of days to 0, WordPress posts will stop accumulating in the trash folder. This is not recommended as there is a chance that you might lose some of the important posts. Therefore, it is advisable to set the number of days less than 30 but not 0.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At times, there are a huge number of posts in Trash and you might want to delete all of them at once. In WordPress, the \u2018wp-config.php\u2019 function controls the time frame for which the data is stored in the WordPress trash folder. By editing the time frame in the \u2018wp-config.php\u2019 function you can reduce the [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[164,312,78,311],"class_list":["post-3704","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-wordpress-faq","tag-blog","tag-trash","tag-wordpress-2","tag-wordpress-trash-posts"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Automatically Delete Trash In WordPress?<\/title>\n<meta name=\"description\" content=\"Step-wise information to automatically delete trash in WordPress. Use these simple steps to stop posts from piling up in trash folder.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/automatically-delete-trash-wordpress\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Automatically Delete Trash In WordPress?\" \/>\n<meta property=\"og:description\" content=\"Step-wise information to automatically delete trash in WordPress. Use these simple steps to stop posts from piling up in trash folder.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/automatically-delete-trash-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2017-07-06T17:21:26+00:00\" \/>\n<meta name=\"author\" content=\"Ujwala\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ujwala\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/automatically-delete-trash-wordpress\/\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/automatically-delete-trash-wordpress\/\",\"name\":\"How To Automatically Delete Trash In WordPress?\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\"},\"datePublished\":\"2017-07-06T17:21:26+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/485f82549b85b9f4c82dc208c42964a8\"},\"description\":\"Step-wise information to automatically delete trash in WordPress. Use these simple steps to stop posts from piling up in trash folder.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/automatically-delete-trash-wordpress\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/automatically-delete-trash-wordpress\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/automatically-delete-trash-wordpress\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Automatically Delete Trash In WordPress?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/485f82549b85b9f4c82dc208c42964a8\",\"name\":\"Ujwala\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8d26ea4b9b2d83ae90b67f6bf5eefbca?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8d26ea4b9b2d83ae90b67f6bf5eefbca?s=96&d=blank&r=g\",\"caption\":\"Ujwala\"},\"description\":\"My aim is to create enriching content on topics related to SEO, web hosting and social media. The idea is to elevate the readers to new levels of usability, accessibility and understanding.\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/ujwala\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Automatically Delete Trash In WordPress?","description":"Step-wise information to automatically delete trash in WordPress. Use these simple steps to stop posts from piling up in trash folder.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/automatically-delete-trash-wordpress\/","og_locale":"en_GB","og_type":"article","og_title":"How To Automatically Delete Trash In WordPress?","og_description":"Step-wise information to automatically delete trash in WordPress. Use these simple steps to stop posts from piling up in trash folder.","og_url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/automatically-delete-trash-wordpress\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2017-07-06T17:21:26+00:00","author":"Ujwala","twitter_misc":{"Written by":"Ujwala","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/automatically-delete-trash-wordpress\/","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/automatically-delete-trash-wordpress\/","name":"How To Automatically Delete Trash In WordPress?","isPartOf":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website"},"datePublished":"2017-07-06T17:21:26+00:00","author":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/485f82549b85b9f4c82dc208c42964a8"},"description":"Step-wise information to automatically delete trash in WordPress. Use these simple steps to stop posts from piling up in trash folder.","breadcrumb":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/automatically-delete-trash-wordpress\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.co.uk\/hosting-faqs\/automatically-delete-trash-wordpress\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/automatically-delete-trash-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"How To Automatically Delete Trash In WordPress?"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/485f82549b85b9f4c82dc208c42964a8","name":"Ujwala","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8d26ea4b9b2d83ae90b67f6bf5eefbca?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8d26ea4b9b2d83ae90b67f6bf5eefbca?s=96&d=blank&r=g","caption":"Ujwala"},"description":"My aim is to create enriching content on topics related to SEO, web hosting and social media. The idea is to elevate the readers to new levels of usability, accessibility and understanding.","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/ujwala\/"}]}},"views":1752,"_links":{"self":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/3704","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=3704"}],"version-history":[{"count":2,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/3704\/revisions"}],"predecessor-version":[{"id":3708,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/3704\/revisions\/3708"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=3704"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=3704"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=3704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}