Jump to content

Loading the Prestashop applications and classes with CLI

Richard Holy

Recommended Posts


Is there a way that I could load the Prestashop application or framework and use it's libraries and classes from CLI?
I am trying to create scripts for cloning instances and it would be great to be able to clear the cache, change the admin password or re-create the SEO URL cache by PHP script running from CLI. Perhaps having something like CLI presenter would do it...? Any suggestions?




Link to comment
Share on other sites


I've done a console using the symfony console component
You can check its possibilities on github : https://github.com/nenes25/prestashop_console

Since the version 1.7. of prestashop a native console is also available you can run it with this command in the prestashop root dir
php bin/console

And starting with version 1.7.5 you can register your own commands.
See : https://devdocs.prestashop.com/1.7/modules/concepts/commands/


Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...