Setup wordpress on directadmin

cacanhmini

Verified User
Joined
May 3, 2022
Messages
34
Sorry guys can you help new users?
I just started using and familiar with directadmin.
I currently have 5 wordpress sites that I want to move to directadmin to manage.
The info I'm using for my WP
Php 8.0.18
MariDB 10.6
OS Ubuntu 22.04.
Can anyone guide me on how to optimally set up directadmin so I can use my WP sites?
Thanks.
1.png
 

Zhenyapan

Verified User
Joined
Feb 23, 2018
Messages
1,179
Location
UA
Welcome!
You installed Directadmin on OS Ubuntu 22.04? it has unsolved issues (too young OS).
It's better to use Ubuntu 20.04 yet.
If your DA license has ProPack - you can use nginx+php-fpm and WP templates provided with it, or use nginx+apache +php-fpm to be able configure php with htaccess, or another fast way - openlitespeed.
 

cacanhmini

Verified User
Joined
May 3, 2022
Messages
34
Welcome!
You installed Directadmin on OS Ubuntu 22.04? it has unsolved issues (too young OS).
It's better to use Ubuntu 20.04 yet.
If your DA license has ProPack - you can use nginx+php-fpm and WP templates provided with it, or use nginx+apache +php-fpm to be able configure php with htaccess, or another fast way - openlitespeed.
Thank you.
I do not have a proback license.
I will reinstall ubuntu 20.04.
Will php, phpmyadmin and apache then default on directadmin?
Where do I go to activate.
 

wtptrs

Verified User
Joined
Jul 13, 2015
Messages
262
You can use the following commands for the installation (see also: https://docs.directadmin.com/gettin...ning-the-installation-with-predefined-options )

Code:
cd /root/
wget -O setup.sh https://download.directadmin.com/setup.sh
chmod 755 setup.sh
export php1_release=8.0
export mariadb=10.6
export mysql_inst=mariadb
export phpmyadmin=yes
export phpmyadmin_ver=5
DA_HOSTNAME={{hostname}} ./setup.sh LICENSE_KEY
 

cacanhmini

Verified User
Joined
May 3, 2022
Messages
34
You can use the following commands for the installation (see also: https://docs.directadmin.com/gettin...ning-the-installation-with-predefined-options )

Code:
cd /root/
wget -O setup.sh https://download.directadmin.com/setup.sh
chmod 755 setup.sh
export php1_release=8.0
export mariadb=10.6
export mysql_inst=mariadb
export phpmyadmin=yes
export phpmyadmin_ver=5
DA_HOSTNAME={{hostname}} ./setup.sh LICENSE_KEY
Thanks wtptrs.
DA_HOSTNAME={{hostname}}
hostname= WP site domain name or server.
I ran the above commands as my php is still 7.4.29.
3.png

WP site domain with cloudflare SSL certificate.
Is this where I copied it from?
2.png
 

wtptrs

Verified User
Joined
Jul 13, 2015
Messages
262
Did you run a new installation? It shouldn't be finished that quickly I think. If you already have a running Directadmin install, you can change PHP/MariaDB settings in options.conf (/usr/local/directadmin/custombuild/options.conf) and update your software:

Code:
cd /usr/local/directadmin/custombuild
./build update_versions

hostname refers to the hostname of your server, not the WP site you're planning to install.
 

cacanhmini

Verified User
Joined
May 3, 2022
Messages
34
Did you run a new installation? It shouldn't be finished that quickly I think. If you already have a running Directadmin install, you can change PHP/MariaDB settings in options.conf (/usr/local/directadmin/custombuild/options.conf) and update your software:

Code:
cd /usr/local/directadmin/custombuild
./build update_versions

hostname refers to the hostname of your server, not the WP site you're planning to install.
thanks wtptrs,
Regarding the ssl part of cloudflare provides. Will I copy the certificates to activate it?
2.png
 

cacanhmini

Verified User
Joined
May 3, 2022
Messages
34
Can we adjust php, phpmyadmin and MariDB version on directadmin interface?

If yes please direct me which item to set up. Thanks.

3.png
 

wtptrs

Verified User
Joined
Jul 13, 2015
Messages
262
If you use the Full SSL (Origin CA) option in Cloudflare (https://www.cloudflare.com/en-gb/ssl/) you can paste your key can cert in the location in your screenshot. You also need to paste your intermediate certificates under the 'Use CA Certificate' option in Directadmin.

You can search for 'Custombuild' in the Directadmin GUI. You can change your software using the Custombuild plugin.

If you install multiple PHP versions you can choose between these using Domain Setup -> your domain -> PHP Version Selector
 

cacanhmini

Verified User
Joined
May 3, 2022
Messages
34
If you use the Full SSL (Origin CA) option in Cloudflare (https://www.cloudflare.com/en-gb/ssl/) you can paste your key can cert in the location in your screenshot. You also need to paste your intermediate certificates under the 'Use CA Certificate' option in Directadmin.

You can search for 'Custombuild' in the Directadmin GUI. You can change your software using the Custombuild plugin.

If you install multiple PHP versions you can choose between these using Domain Setup -> your domain -> PHP Version Selector
thanks wtptrs.
I have added a domain name.
As I don't see the PHP Version Selector entry.
4.png
 

wtptrs

Verified User
Joined
Jul 13, 2015
Messages
262
It will only appear if you have multiple PHP versions installed (you can do this in Custombuild). If not, the installed PHP version will be used.
 

cacanhmini

Verified User
Joined
May 3, 2022
Messages
34
It will only appear if you have multiple PHP versions installed (you can do this in Custombuild). If not, the installed PHP version will be used.
Thanks wtptrs,
You are wonderful.
Can you guide me on the ssl part?
Why when I copy the certificate I get this message.

error writing cert test file: Error opening /home/tmp/cert_test.oxn7bg for writing: Permission denied

Certificate is Invalid
error writing key test file: Error opening /home/tmp/key_test.687O4j for writing: Permission denied

Key is Invalid
 

wtptrs

Verified User
Joined
Jul 13, 2015
Messages
262

cacanhmini

Verified User
Joined
May 3, 2022
Messages
34
Can you try to set your permissions on /home/tmp less strict and try again? This has to be done in the CLI by a user with root permissions:

Code:
chmod 1777 /home/tmp

---

@smtalk @fln could you perhaps check if /home/tmp permissions have been changed in a recent setup.sh revision? There seem to be multiple issues with this lately with fresh DA installs, see also https://forum.directadmin.com/threads/usr-local-bin-curl-returned-error-code-1.66158/
You are wonderful. Thank you very much.
Sorry can you tell me more about WP site security?
My WP site has been attacked by DDOS twice.
When using the administration system is vestacp. So now I'm switching to learn directadmin for more protection.
 

cacanhmini

Verified User
Joined
May 3, 2022
Messages
34
Start with installation of CSF (firewall) for your server (can be installed by Custombuild) and Wordfence plugin for your WP site
Thanks Active8.
That's so great. Like when running CSF (firewall) and Wordfence plugin. Should I leave it as default or do I need to tweak it somewhere?

Also, let me ask about the picture below.

2.png
Normally, to run a good WP site, how much bandwidth and disk space should be left.
Thanks.
 

Active8

Verified User
Joined
Jul 13, 2013
Messages
1,142
Should I leave it as default or do I need to tweak it somewhere?
Depends of your needs, but as long as you not under attack you can keep the defaults
For Wordfence I strongly recommended to activate the firewall in the plugin as extra layer of security
how much bandwidth and disk space should be left.
Depends, how much visitors and the kind of data you are serving (only pages or files to be downloaded) so cant say anything..
 

wtptrs

Verified User
Joined
Jul 13, 2015
Messages
262
Regarding disk space, always keep a few hundred MB as free space or else your Wordpress upgrades (core, plugins) might fail.
 

cacanhmini

Verified User
Joined
May 3, 2022
Messages
34
Regarding disk space, always keep a few hundred MB as free space or else your Wordpress upgrades (core, plugins) might fail.
thanks wtptrs,
Can you guide me how to setup new ssl for hostname IP?
can directadmin be set up like this?
for example https://2.3.4.0:2222
And is it possible to replace the default username of directadmin admin with another name?
 

Richard G

Verified User
Joined
Jul 6, 2008
Messages
8,767
Location
Maastricht
Top