I’m looking for a way to sanitize the filename of user uploaded attachments. I thought that wordpress already did it but I faced preblems after an user uploaded an...
  • May 23, 2022
  • 0 Comments
Is it possible to move the entire wp-content folder outside of the Web root? I need to prevent anyone to view any asset file (images, pdfs, movies etc) with...
  • May 19, 2022
  • 0 Comments
I have installed WordPress on my local Ubuntu machine, with standard LAMP configuration and phpMyAdmin. The installation directory is localhost:///var/www/blog. At the second step of the installation, after I’ve...
  • May 19, 2022
  • 0 Comments
I’m using an external CSV reading library that takes a filehandle (resource) as an argument. I’m using wp_handle_upload() to actually process and store the file in the Uploads directory,...
  • May 15, 2022
  • 0 Comments
I’d like to use $wp_filesystem which seems to be the recommended way to manipulate file system objects in WordPress but compare this: plain PHP code: mkdir('abc'); WP Filesystem API...
  • May 12, 2022
  • 0 Comments
I have a function wp_handle_upload() for uploads files. $file = $_FILES['attachment_icon-' . $i]; $upload = wp_handle_upload($file, array('test_form' => false)); what is a function for delete a uploaded file? 2...
  • May 11, 2022
  • 0 Comments