XF 2.0 Is it safe to delete folders not included in the download package

abdfahim

Well-known member
I have lots of orphan folders/files from XF1 and addons. Now, some of them are obvious that they are from XF1 and some known addons, but some of the folders I am not sure about.

So, if I just delete all the folders which is not included in the XF2 download package, is that safe? I am actually wondering if XF2 creates some new folder during its upgrade process.

I have all my XF1 addons/styles uninstalled before I upgraded to XF2 (it would have been nice if XF system automatically deleted the associated files/folders once an addon is uninstalled).
 
As an example, in js/ folder, I have lots of subfolders which I don't recognize. Also, from the last modification date, it seems like only the green bordered ones were created during/after I upgraded to XF2 on Dec 8. Other folders are not included in XF2 fresh download package as well.

So, can I delete other folders safely?

1513296220396.webp
 
Thanks a lot, @Chris. One last bit in this regard. Can you please confirm if any of the following PHP files (at the root) is required by XF2?

admindav.php
cron.php
deferred.php
fb_channel.php
recaptchalib.php
rgba.php
test.php
verify.php
 
Thanks a lot. Most likely cron.php came from some old addon because it's content shows links to XF1/library. I'll go ahead with deletion to Trash so that I can restore it if my site throws any error in near future.

Thanks again.

Code:
<?php

$startTime = microtime(true);
$fileDir = dirname(__FILE__);

require($fileDir . '/library/XenForo/Autoloader.php');
XenForo_Autoloader::getInstance()->setupAutoloader($fileDir . '/library');

XenForo_Application::initialize($fileDir . '/library', $fileDir);
XenForo_Application::set('page_start_time', $startTime);

XenForo_Cron::runAndOutput();
 
You can use this add-on but it requires CLI access on the server. This safely removes all known XF1 exclusive files.

 
  • Like
Reactions: ivp
Top Bottom