After Updating to Version 2.1, You Can Delete These Files and Folder

There are a lot of code enhancements and improvements in version 2.1. Some of them mean that certain files (and one folder) are redundant and are no longer included in the ClassicPress bundle. Anyone installing ClassicPress from scratch from now on will not, therefore, have those files and folder installed on their site.

For those who already had a site (whether on ClassicPress or WordPress) and who upgraded to version 2.1, however, those files and folder will still be “left over”, because core never deletes files from your site. The purpose of this post is, therefore, to list these files and folder so that you can delete them manually (e.g. by using SFTP or your host’s File Manager).

The folder is: ~/wp-includes/js/swfupload/

The files are:
~/wp-includes/js/swfobject.js
~/wp-includes/js/mediaelement/mediaelement-migrate.js
~/wp-includes/js/mediaelement/mediaelement-migrate.min.js
~/wp-includes/js/mediaelement/mejs-controls.png

~/wp-admin/js/tags-suggest.js
~/wp-admin/js/tags-suggest.min.js
~/wp-admin/js/user-suggest.js
~/wp-admin/js/user-suggest.min.js

For those curious about what has rendered these files and folder redundant, those with swf in their name existed to enable Adobe Flash. But no browser these days permits Flash to run, so these files literally do nothing except take up space (and, potentially, act as an unexpected attack vector).

So far as the mediaelement files are concerned, ClassicPress version 2.1 has upgraded to the latest version of the mediaelement media player, and it simply no longer uses those files.

Finally, the files with suggest in their name have been replaced either by the native HTML datalist element or with much more efficient code in vanilla JavaScript, both of which perform significantly faster than the files that they replace.

4 Likes

@timkaye - a PR can be made that will automatically remove these files on the next update release. Perhaps we need to revisit the new theme install idea and remove these files also.

3 Likes

It’s not like flash doesn’t work. I have a website with video games and, among other things, I have several flash games that are through an emulator and very functional.
True, they don’t work best on mobile devices due to the size of the screen, and they aren’t designed for flash either.
Open any game and you’ll see that I’m right

If auto remove will break my games then don’t add that code because then I won’t update CP to newer version anymore

Read my post again. I didn’t say Flash doesn’t work. Indeed, I said it can provide an unexpected attack vector, which obviously wouldn’t be possible if it didn’t work.

What I said was that browsers no longer permit Flash to run. Your use of an emulator evidently gets around that, but modern browsers consider Flash a security risk.

1 Like

My point of comment is that @MattyRob mentions the possibility of automatically deleting those folders when updating to a new version of CP. I wouldn’t be happy if that update broke my flash games. So I will be more careful with CP updates

@JerryNidzo you use an emulator. That emulator is providing the flash functionality to your site, not CP. removing those files from CP won’t alter the way the emulator works because the emulator itself already has all the things it needs to run flash.

That said, I can understand the need for it to run retro games, but it might be a good idea to check that your emulator does not expose you to risks.

@JerryNidzo - I appreciate you trying to stop issues and bugs before they happen but all of those files listed above are no longer loaded when ClassicPress loads, so if anything was going to break it should have broken already.

As a test can you try deleting or renaming those files to check on your site that everything still works, that’s be really useful in deciding if a PR to delete these files is worth pursuing.

I look forward to hearing from you.

I only changed the name of the above folder, I did not delete it.
As a result, the games are still playable, but I’ll still be careful
Note: CP version is 2.0

1 Like

As someone with multiple sites, a ‘one time thing’ that I can accept or not to clean these files seems useful.

See now: ClassicPress 2.1.1 Release Notes