Automatic deployment to Hostinger from GitHub
How to publish a site to Hostinger automatically from a GitHub repository: Git deployment in hPanel, a webhook, a GitHub Actions build and keeping secrets safe.

Automation of routine tasks is an essential aspect of any developer’s work. In the world of WordPress, this is especially relevant, as the platform offers numerous tools for automation through the command line. One such tool is WP-CLI (WordPress Command Line Interface), which allows for quick and efficient execution of many site development and administration operations.
WP-CLI offers a wide range of commands that simplify the process of installing and configuring WordPress. Let’s look at the basic steps for installing WordPress using WP-CLI.
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
php wp-cli.phar --info
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
wp core download
wp-config.php file with the specified database parameters: wp config create --dbname=your_db_name --dbuser=your_db_user --dbpass=your_db_password --dbhost=localhost --dbprefix=wp_
wp core install --url=your_site_url --title="Your Site Title" --admin_user=your_username --admin_password=your_password --admin_email=your_email@example.com
Plugins are an important part of the WordPress ecosystem, and WP-CLI greatly simplifies their installation and management. For example, to install several popular plugins, you can use the following commands:
wp plugin install akismet --activate
wp plugin install jetpack --activate
wp plugin install yoast-seo --activate
plugins.txt with a list of plugins, one per line. For example: akismet
jetpack
yoast-seo
contact-form-7
Then use the following command for bulk installation and activation:
wp plugin install $(cat plugins.txt) --activate
Sometimes developers need to create or install a “stub” theme for initial setup or testing. WP-CLI allows for this to be done quickly as well.
wp scaffold theme my-theme --activate
twentytwentyone theme: wp theme install twentytwentyone --activate
Using WP-CLI greatly simplifies and accelerates the process of installing, configuring, and administering WordPress. It allows automating most routine tasks, freeing up time for more complex and creative aspects of development. By mastering the basic WP-CLI commands, developers can increase their productivity and reduce the number of errors that occur when performing repetitive operations manually.
Need help with this?
Improving an existing WordPress site: new features, integrations, design changes and faster code, done with AI tools and reviewed by hand. From €60 + VAT.
More about the service →
Local machine → repository → server: you ask, an AI agent changes the site, every change is reviewed, saved and deployed automatically. I set it up and teach your team.
How it works →

How to publish a site to Hostinger automatically from a GitHub repository: Git deployment in hPanel, a webhook, a GitHub Actions build and keeping secrets safe.

Two ways to put a WordPress site under Git: keep the theme and plugins in a repository, or export the content into a static site. What to commit and how to deploy.

How managing a website through an AI coding agent works: what to prepare, the cycle from request to publishing, and which tasks to trust an agent with.

Contact
An AI agent, an automation, a website improvement or a full rebuild — describe the task in a few lines and I will reply within one business day.
Tallinn, Estonia · working remotely across Europe
The site does not use cookies. Visit statistics are collected without them. Learn more