| Server IP : 65.108.144.40 / Your IP : 216.73.217.165 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64 User : dev ( 1000) PHP Version : 8.2.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/coopermain/ |
Upload File : |
#!/bin/bash
# ================================================
# PLUGIN INSTALLATION
# ================================================
# Install and activate Gravity Forms CLI
echo -e "\nInstall Gravity Forms CLI"
wp plugin install gravityformscli --activate
wp plugin activate gravityforms
wp gf license update ${gf_license}
echo -e "\nUpdating Gravity Forms configuration"
wp option update rg_gforms_currency "AUD" --autoload=yes
wp option update rg_gforms_enable_akismet "" --autoload=yes
#wp option update gform_enable_background_updates "1" --autoload=yes
wp option update gform_enable_noconflict "1" --autoload=yes
wp option update gform_pending_installation "" --autoload=yes
wp option update gform_enable_toolbar_menu "" --autoload=yes
wp option update rg_gforms_disable_css "1" --autoload=yes
wp option update rg_gforms_enable_html "1" --autoload=yes
echo -e "\nImport Gravity Forms schemas"
wp gf form import "${TMPBUILDDIR}/forms/gravity-forms/gravityforms-export-contact.json"
wp gf form import "${TMPBUILDDIR}/forms/gravity-forms/gravityforms-export-subscribe.json"
# Remove Gravity Forms CLI
echo -e "\nRemoving Gravity Forms CLI plugin"
wp plugin deactivate gravityformscli
wp plugin delete gravityformscli
# Activate plugins
echo -e "\nActivating plugins"
wp plugin activate advanced-custom-fields-pro acf-gravityforms-add-on lamb-search enviromon
wp eval "acf_pro_update_license('${acf_license}');"
# Update all plugins to latest versions
echo -e "\nUpgrading all plugins to latest versions"
wp plugin update --all --exclude="advanced-custom-fields-pro" --minor
# ================================================
# THEME USER
# ================================================
# Create new 'Lamb Agency' user role type with same capabilities as 'Administrator'
echo -e "\nCreating new role 'Lamb Agency'"
wp user add-role "lamb" lambagency
wp user update "lamb" --display_name="Lamb Agency"
# ================================================
# THEME CONTENT
# ================================================
# Blog Options
echo -e "\nConfiguring Wordpress settings"
wp option update blogdescription "" # Clear the tagline
wp option update timezone_string Australia/Brisbane # Set the local timezone
wp option update blog_public 0
# Create standard pages
echo -e "\nCreating pages"
wp post create --post_type=page --post_status=publish --post_title='Home' # post_id 3
wp post create --post_type=page --post_status=publish --post_title='About Us' # post_id 4
wp post create --post_type=page --post_status=publish --post_title='Contact Us' # post_id 5
wp post create --post_type=page --post_status=publish --post_title='Blog' # post_id 6
wp post create --post_type=page --post_status=publish --post_title='Thank You' --post_parent=5 # post_id 8
# Delete dummy pages/posts
echo -e "\nDelete dummy Wordpress pages/posts"
wp post delete 1 --force
wp post delete 2 --force
# Setup the home/blog views
echo -e "\nSetting home and blog pages"
wp option update show_on_front page
wp option update page_on_front 3
wp option update page_for_posts 6
# Setup permalinks
echo -e "\nUpdate permalink structure to /blog/%postname%"
wp rewrite structure '/blog/%postname%'
# Create menus
echo -e "\nCreating menus"
wp menu create 'Header - Top'
wp menu create 'Header - Main'
wp menu create 'Footer - Main'
wp menu create 'Footer - Legals'
wp menu location assign 'Header - Top' header-top
wp menu location assign 'Header - Main' header-main
wp menu location assign 'Footer - Main' footer-main
wp menu location assign 'Footer - Legals' footer-legals
# Add pages to menus
echo -e "\nAssigning pages to menus"
wp menu item add-post header-top 4
wp menu item add-post header-top 5
wp menu item add-post header-top 6
wp menu item add-post header-main 4
wp menu item add-post header-main 5
wp menu item add-post header-main 6
wp menu item add-post footer-main 3
wp menu item add-post footer-main 4
wp menu item add-post footer-main 5
wp menu item add-post footer-main 6