Following our previous Blesta tutorial on how to install Blesta on your server, it’s time to configure it, and create packages, servers, and order pages.
The official Blesta documentation is a bit light on this process, and there aren’t many great resources about this either. So here’s a step-by-step tutorial on how to go about it.
- Can You Connect Your WordPress Site With Blesta?
- Step 1: Configure Blesta Cron
- Step 2: Enable the cPanel Module
- Step 3: Adding a New Server to Blesta
- Step 4: Create a New Blesta Package
- Step 5: Create an Order Form
- Testing the Order Form
- There’s a Lot Most Customization to be Done… But First A Logo
Can You Connect Your WordPress Site With Blesta?
To clear up some confusion, Blesta has its own mechanism to create order pages with the checkout, customer information, and package details. These order pages have their own URLs and are native to the Blesta system. However, you can use WordPress for the presentation of the various package details and other aspects of your hosting server. So in a way, there’s a handshake between WordPress and Blesta as a user moves from viewing packages to actually purchasing one, but there’s no actual connection or plugin.
So let’s assume you would like to setup WordPress to showcase your packages and plans!
Step 1: Configure Blesta Cron
After installing Blesta, the first step is configuring the cron job to run every five minutes. The Blesta cron job consists of dozens of important tasks related to Blesta setup and maintenance, including the configuration of plugins, processing abandoned orders, ticket management, and more. Before we proceed to create the order page and pages, we need to set up cron.
When you first install Blesta, you must pay heed to the “System Status” box in the lower-right corner. As you can see below, right now the status is “red”, and it’s telling me to configure cron:
Click the “Configure” link shown above. This will bring us to a cron page that gives us the command to run:
The cron command starts with a slash (/). The stars and numbers before it are the parameters for scheduling it – every five minutes. To set up cron, open the cPanel account associated with the domain name on which Blesta runs, and click the icon of the cron jobs. Here, under the section to add a new cron job, select the drop-down box that makes it run every five minutes and paste the command from the previous screenshot into the field labeled “Command”:
Save your new cron job. But instead of waiting for the first run occurrence, we’d like to do it manually. So go back to the Blesta cron page and click “Run Cron Manually” as shown here:
Once done, you’ve set up cron and Blesta is now ready to create the packages and order pages.
Step 2: Enable the cPanel Module
To be able to create packages and provision the new accounts, Blesta needs to interface with your server. We can do this by installing the module corresponding to your web hosting control panel. If you’re using a NameHero server, you can install either the cPanel or the InterWorx module. For this tutorial, I’ll assume you’re using cPanel.
From the Blesta admin panel, click the settings icon on the top-right corner, and then choose “Modules” as shown here:
The following screen will show you a list of active modules. To install a new module, click “Available” as shown here:
In the list of available modules, click “cPanel”, or whichever admin panel you use on your server. When you’re done, you’ll get a message if the cPanel module installation is successful, and it’s time to add a new server.
Step 3: Adding a New Server to Blesta
By default, Blesta doesn’t know anything about the kind of server you have. Through the cPanel module, you can configure new servers or even groups of servers. For the purposes of this tutorial, let’s keep it simple and create a single server. In the setup screen after installing the module, click “Add Server” as shown here:
This will open the configuration to add a new server to Blesta. In the fields below, provide the following information:
- Server Label – Just use the Hostname
- Hostname – Your WHM server hostname
- User Name – root
Next, you have to provide the “Token or Remote Key” so that Blesta can manage your server. To find this, go to your WHM panel and type “Manage API” into the search box as shown here:
In the next screen, click “Generate Token” as shown here:
Now give a name to your token and access to the entire set of permissions, and click “Save”:
This will bring up the screen that shows your token. THIS WILL NOT BE SAVED! So make sure that you copy it before closing the screen. Once done, paste it into the Blesta server configuration screen like this:
Finding the WHM Nameservers
You also need to provide Blesta with the WHM nameservers for new clients. To find the nameservers that WHM users, search for “Basic WebHost Manager Setup” as shown here:
In the next screen, scroll all the way down to the “Nameservers” section and find the two nameservers:
Paste these nameservers into the Blesta server configuration screen like this:
Save your changes and you’re done!
Step 4: Create a New Blesta Package
Now that we have our server, it’s time for us to create an actual package. To do this, click “Packages” on the top menu and select the first option. This brings up the Blesta package creation screen.
Give your package a name and a description as shown above. Next, click the “Module” tab on top and select “cPanel” like this:
In “Group”, choose any group, and select a cPanel package. Next, return to the main tab and create the package you want.
Here you can configure options like how long the package’s subscription term lasts, the value, whether or not tax is included, and all the other parameters that go into creating a package on a server. Finally, create a new group (you can’t proceed without this) and click “Create Package”.
Step 5: Create an Order Form
Finally, we need to bring everything together and create an order form. To do this, click “Packages” once again from the menu and choose “Order Forms” as shown here:
This will bring you to the list of order forms. Right now, it’s all blank, so click the “plus” sign as shown here:
Now give your order form a name and a label like this:
Scroll down, and move your groups to the “Assigned” block as shown here:
Choose your currency and save your form. You’re done!
Testing the Order Form
To see what you’ve created, click the order form link in the list of order forms, or just copy the order label that you created in the previous step. For the above example, here’s what the Blesta order form looks like:
From here, the customer can customize their order, select the time period that you specified earlier, and more. This is the first step of the checkout process. So you’d basically want to have a plans in pricing page built in WordPress, and then if someone were to click “Order Now” when trying to buy your Basic Package, you would send them here to complete the checkout process. Make sense?
There’s a Lot Most Customization to be Done… But First A Logo
What I’ve shown you is just a basic order form with the bare minimum number of options.
Blesta allows you a lot more customization, I would recommend first updating your logo on the top left as a start and then going from there. To update your logo, simply navigate to Settings > Company > Look and Feel > Client > Select non default logo and paste in your logo link.
I’m a NameHero team member, and an expert on WordPress and web hosting. I’ve been in this industry since 2008. I’ve also developed apps on Android and have written extensive tutorials on managing Linux servers. You can contact me on my website WP-Tweaks.com!
Leave a Reply