I need to implement in a wordpress instance a feature that allows me to search for the most recent file with extension .xlsx in the wp-content/upload directory, once the file has been identified, it should be interpreted and finally insert the excel data in the wp_posts and wp_postmeta tables Following a certain logic.

The packages of interest are

  • symfony/finder
  • phpoffice/phpspreadsheet

What is the correct way to integrate and use packages within wordpress?

I am new to worpress and I do not know how in the structure and philosophy of wordpress to do this. Thanks for the time.

New contributor
user615274 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • You would just need to include your dependencies in your theme/plugin. WordPress itself doesn't have its own way of managing dependencies/composer packages. – Jacob Peattie Dec 7 at 4:04
  • thanks for answering. should I then reference the packages in the vendor directory from the functions.php file of the theme, for example, or from a plugin? – user615274 Dec 7 at 4:16
  • Yeah, you would just include the composer autoload.php file from the vendor directory in your functions.php or main plugin file. – Jacob Peattie Dec 7 at 4:24

Your Answer

user615274 is a new contributor. Be nice, and check out our Code of Conduct.

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.