Add New PHP / WordPress Website in Ajenti V Tutorial

Adding a new PHP / WordPress website in Ajenti V couldn’t be easier. This VPS web control panel has a nice, pretty interface, which attracts many users. Nonetheless, if you are unsure about how to set up a new PHP / WordPress website in Ajenti V, simply follow this easy step by step tutorial.

Step 1: Log in to Ajenti V Control Panel

Using your web browser, log in to your Ajenti V control panel. If you didn’t change the default port number of 8000, then you can log in to Ajenti V by going to https://123.123.123.123:8000 (substitute 123.123.123.123 with your VPS or Dedicated server’s IP address). If you did change Ajenti V’s default port number, then simply substitute 8000 with whatever port number you are using.

Ajenti Login Default Username & Password root admin

Ajenti V Default Dashboard

Step 2: Create / Add New Website

Click on Websites. Enter a name for your website like Personal Website and click CREATE.

Ajenti V Add Create New PHP WordPress Website

Step 3: Manage Website Configuration / Settings

Click MANAGE to the right of your newly created website.

Ajenti V Manage New PHP WordPress Website Configuration

Step 4: General Website Settings Tab

Click on the General tab. Uncheck Maintenance mode and change the Path to /var/www/domain.com/web (replace domain.com with your domain name). Click CREATE DIRECTORY.

Ajenti V Website Path Maintenance Mode

Step 5: Domain Settings Tab

Click on the Domains tab. Click +ADD. Instead of example.com, put in a domain of yours with DNS settings already pointed at your web server’s IP address (e.g. domain.com).

Ajenti V Websites Domains

Ajenti V Domains Settings Tab Add Website

Step 6: Port Settings Tab

Click on the Ports tab. Click + Add to add a new port. Change the newly created port from 80 to 443. Enable SSL by clicking the box beneath where it says SSL (to the right of the 443 you just entered).

Ajenti V Port 443 SSL Website Certificate

Step 7: SSL Settings Tab

Click on the SSL tab. In the SSL certificate path, enter the following:

/etc/custom/ssl/nginx.crt

In the SSL key path, enter the following:

/etc/custom/ssl/nginx.key

Ajenti V SSL Nginx PHP Website Certificate

Step 8: Content Settings Tab

Click on the Content tab. Select PHP FastCGI and click +CREATE.

Ajenti V Content PHP FastCGI WordPress Website

Ajenti V Content PHP FastCGI WordPress Websites

Step 9: Advanced Settings Tab

Click on the Advanced tab. In the Custom configuration box, enter in the following:

# Uncomment the code below to use htpasswd authentication
#location ^~ (wp-login)\.php$ {
# auth_basic "Admin Login";
# auth_basic_user_file /etc/custom/pma_pass;
#}

location / {
try_files $uri $uri/ /index.php?$args;
}

# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;

Ajenti V Advanced Custom Configuration WordPress PHP

If you uncommented the commented lines above (by removing the # symbols at the beginning of lines 2-5), this will secure your WordPress login page by requiring a user to enter in a valid username and password before even seeing the actual WordPress login page.

Authentication Required Ajenti Nginx htaccess

Step 10: MySQL Settings Tab

Click on the MySQL tab. In the DATABASES section, for the Name field, enter in a database name for your website’s MySQL database (e.g. personal-website). Then click + CREATE to create the the MySQL database.

Ajenti V Create MySQL Database Name

In the USERS section, for the Name field, enter in a user name for the user that will access your website’s newly created MySQL database (e.g. personal-website). For the Password field, enter in a secure password for the MySQL user of this MySQL database. Then click + CREATE to create the the MySQL database user. Then click GRANT ALL PERMISSIONS.

Ajenti V Create MySQL Database User Grant All Permissions

Step 11: FTP Settings Tab

Click on the FTP tab. For the Username field, enter in a user name for the FTP user that will access your newly created website (e.g. personal-website). For the Password field, enter in a secure password for the FTP user.

Ajenti V Create FTP User WordPress PHP Website

Step 12: Fix File Permissions

Click on the General tab. Click FIX FILE PERMISSIONS. Scroll down and click APPLY CHANGES and then wait a moment for the changes to take effect.

Ajenti V Fix PHP Website File Permissions

Step 13: Log in to FTP

You may now log in to FTP and upload your website files. To do so, simply use your domain name as the host in your FTP client (e.g. domain.com). For protocol, select FTP. If your FTP client gives you the option to choose the encryption type, choose Require explicit FTP over TLS. For username, enter in your FTP username you created earlier. For password, enter in your password you chose when you created the FTP user. When logging in for the first time, you may get a message from the FTP client regarding the security certificate. Go ahead and click OK and continue. Now you may upload your files normally.

Troubleshooting

Browser Downloads wp-login.php File

Try the following code for the custom configuration in the Advanced tab of Ajenti V instead of the code used above for the auth basic module:

location ~* (wp-login)\.php$ {
auth_basic "Admin Login";
auth_basic_user_file /etc/custom/pma_pass;
}

Further reading:

1 thought on “Add New PHP / WordPress Website in Ajenti V Tutorial”

Comments are closed.