Page 1 of 1

WordPress auto install bash script for VestaCP

Posted: Fri Dec 08, 2017 4:24 pm
by lukapaunovic
Me and dpeca wrote a simple bash script which will enable you to easily install WordPress via bash for any domain hosted by VestaCP

Installing:

Code: Select all

wget https://raw.githubusercontent.com/lukapaunovic/create_wp/master/create_wp.sh && chmod +x create_wp.sh && mv create_wp.sh /usr/local/bin/create_wp
Usage:

Code: Select all

usage: create_wp domain [email]
Email argument is optional.
The script will automatically install SSL certificate for the domain.
A script is using always the latest version of WP-CLI.
When it's done you'll see something like:
=================================================================
Installation is complete. Your username/password is listed below.

Username: admin
Password: As4&3sG

=================================================================
As the script always runs as the specified user, permissions and file ownership will remain correct. Also, it's 100% safe to use.

NOTE: INTENDED ONLY TO BE RUN ON FRESHLY ADDED DOMAINS, OTHERWISE WILL REMOVE EVERYTHING FROM SPECIFIED DOMAINS PUBLIC_HTML FOLDER

Github: https://github.com/lukapaunovic/create_wp/

Re: WordPress auto install bash script for VestaCP

Posted: Mon Dec 11, 2017 12:06 pm
by Phogo
Thanks, works great!

Re: WordPress auto install bash script for VestaCP

Posted: Thu Dec 21, 2017 1:36 pm
by SysOp
Works very well!
Thank you very much

Greetings and a happy holiday from germany ;)

Re: WordPress auto install bash script for VestaCP

Posted: Wed Apr 03, 2019 3:46 pm
by cyril
It looks great, but I have a problem:

1. Install

Code: Select all

wget https://raw.githubusercontent.com/lukapaunovic/create_wp/master/create_wp.sh && chmod +x create_wp.sh && mv create_wp.sh /usr/local/bin/create_wp
Error:

Code: Select all

mv: cannot move ‘create_wp.sh /usr/local/bin/create_wp’: Permission denied
So I move with sudo

Code: Select all

sudo mv create_wp.sh /usr/local/bin/create_wp
2. Usage:

Code: Select all

create_wp mynewdomain.com
error:

Code: Select all

grep: /usr/local/vesta/data/users/*/*.conf: Permission denied
Domain doesn't exist
How to deal with this problem, thanks for your reply.

Re: WordPress auto install bash script for VestaCP

Posted: Thu Jul 18, 2019 10:31 pm
by qwerty
thanks a lot for ur script! but somebody help me please!

Image

after installation i reboot my server.
wordpress is not working.
when you click on the address https://domain.ru/wp-admin/ error 404 appears.

File wp-config.php contains trully: DB_PASSWORD DB_NAME DB_USER

what to do?

Re: WordPress auto install bash script for VestaCP

Posted: Thu Jul 18, 2019 11:12 pm
by grayfolk
Try to change template for this domain.

Re: WordPress auto install bash script for VestaCP

Posted: Fri Jul 19, 2019 2:02 pm
by qwerty
grayfolk wrote:
Thu Jul 18, 2019 11:12 pm
Try to change template for this domain.
I dont understand how can i change template if i have 404 error...
Сan you explain?

I just ran a script as root and the result appeared like:

Code: Select all

Installation is complete. Your username/password is listed below.
Site: https://mydomain/
Login: https://mydomain/wp-admin/
Username: admin
Password: password
after installation i reboot.
i think that script does not work properly

Re: WordPress auto install bash script for VestaCP

Posted: Sun Sep 01, 2019 6:47 pm
by ufuk
Its amazing. Thank you.