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.

  • 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. Dec 7, 2018 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, 2018 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. Dec 7, 2018 at 4:24
  • 1
    Possible duplicate of Using composer for dependency management in plugindevelopment Dec 7, 2018 at 7:58


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.