This question has been answered by BobRay. See the first response.
DELETE FROM modx_site_content WHERE deleted=1
<?php
define('MODX_API_MODE', true);
// this goes to the main index.php in web root
include 'index.php';
$c = $modx->newQuery('modResource');
$c->where(array(
'deleted' => 1
));
// or less amount
$c->limit(1000);
$resources = $modx->getCollection('modResource', $c);
if (!$resources) {
die('No $resources was found');
}
foreach ($resources as $resource) {
$resource->remove();
}
echo 'Done';
<?php
define('MODX_API_MODE', true);
// this goes to the main index.php in web root
include 'index.php';
while(true) {
set_time_limit(0);
$c = $modx->newQuery('modResource');
$c->where(array(
'deleted' => 1
));
// or less amount
$c->limit(1000);
$resources = $modx->getCollection('modResource', $c);
if (!$resources) {
break;
}
foreach ($resources as $resource) {
$resource->remove();
}
}
echo 'Done';