Ampps existing wordpress11/11/2022 ![]() I'm told it's very helpful, but it's also very specific to the Alfred-Workflow library and Python. Here's the tutorial for the workflow library I wrote. It might be a good idea to read a few tutorials and look at a few other, simpler workflows to get a feel for how they're structured before trying to build something so complex. The workflow you're talking about implementing seems to be a relatively complex one. #Ampps existing wordpress how to#Here's the forum thread with a list of workflow libraries.Īlfred's docs can't really provide a proper description of how to write a workflow based on scripts because it supports so many languages. It's silly to write all this code yourself. It doesn't include any config files in the workflow itself.Īlmost all complex workflows use a workflow library that takes care of things like saving settings, caching data and generating XML output for Alfred. The workflow you linked to includes a workflow library (workflow.php) that provides an API for the workflow to easily set configuration options that workflow.php saves in the proper location. These can be hardcoded in the script or you can include a sample config file that's copied to the default location if no user config file exists. Your workflow should have some reasonable defaults. Any settings that are user-specific have no place in the workflow itself. You don't save a config file inside a workflow to be distributed. #Ampps existing wordpress install#usr/local/bin/wp core install -url="" -admin_user=$admin_user -admin_password=$admin_password -admin_email=$admin_email ![]() usr/local/bin/wp core config -dbname=$dbname -dbuser=$dbuser -dbpass=$dbpass # Setup wp-config file with WP_DEBUG enabled Applications/AMPPS/mysql/bin/mysql -u $mysqluser -p$mysqlpassword -e "CREATE USER '$dbuser' IDENTIFIED BY '$dbpass' " Applications/AMPPS/mysql/bin/mysql -u $dbuser -p$dbpass -e "use $dbname " Applications/AMPPS/mysql/bin/mysql -u $mysqluser -p$mysqlpassword -e "GRANT ALL PRIVILEGES ON $dbname.* TO IDENTIFIED BY '$dbpass' " Applications/AMPPS/mysql/bin/mysql -u $mysqluser -p$mysqlpassword -e "CREATE DATABASE $dbname " ![]() #export PATH=$PATH:/usr/local/bin:/Applications/MAMP/Library/binĮxport PATH=/Applications/AMPPS/php-5.6/bin:$PATHĮxport PATH=$PATH:/Applications/AMPPS/mysql/bin #export PATH=/Applications/MAMP/bin/php/php5.6.1/bin:$PATH I borrowed code from a few different places. ![]() I'm running AMPPS for testing, and it all works. I'd like to share it, but I'd also like some feedback on cleaning it up (if needed), and how to create a config file for default settings such as WordPress user, password, email, so that I can keep sensitive data separate from the actual script. So I started using Alfred a few weeks ago, and just realized how awesome it is, so I decided to put together a WordPress Workflow. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |