Common actions
# Common actions
Here you'll find the most common actions taking place in Plesk.
# Setting up a website (or subdomain)
All of these steps are executed in the Plesk Interface, no CLI required!
Are we in control of the DNS and Website?
No: Set up the domain as a subdomain of the subscription beeldr.nl (don’t forget to remove the website after the website goes live)
Yes: Create a domain in the subscription of the customer.
Don’t modify the root folder just yet during setup, this will come after deploying git.
After setting up the domain enter the “File Manager“ and remove all files in the folder (these are default files that will clutter your git deployment)
Go back to the domain overview and select “Git” from the menu items
- Click the “Add repository” button to add a git repository
- Find the repo in Bitbucket, click the clone button in the top right corner and select the last part (it starts with git@bitbucket.org:)
- Paste the repository URL in Plesk, click the SSH public key below to copy it
- Go back to the repo in Bitbucket, open “Repository settings” > “Access keys” and add the key you’ve just copied from Plesk (Optional: add a label saying plesk, live or staging)
- Return to plesk and click the “Create” button, this will automatically deploy the repository to the site web root.
In the domain overview select the tab “Hosting & DNS” and click the “Web Hosting Access” item. Set the “Access to the server over SSH” to “/bin/bash (chrooted)” and press save, this will allow SSH access via the plesk domain overview.
In the domain overview open “PHP Settings” and select the highest PHP version your CMS supports and click save.
In the domain overview open “SSL/TLS Certificates”, scroll down and click the Lets Encrypt option, enter a valid e-mail (preferably webhosting@beeldr.nl, so we get the emails about renewal and errors). In case of a subdomain you don’t have to select any of the non-checked boxes. To finish the SSL request click “Get it Free”.
Optional: In the domain overview select the tab “Hosting & DNS” and click the “Hosting Settings” item. Set the “Document root” to the desired folder, for Craft just add /web.
In the domain overview select the tab “PHP Composer” and click the “Scan” button to check for composer files. When a composer file is found just press install.
When needed: In the domain overview select the tab “Databases” and click the “Add Database” button. Fill in all the fields, select the website the database is related to and set the sever to db1.beeldr.hosting, make sure to write down the user data because you will need it in the .env file or other config file.
After saving the database click on the database the list an import a dump frown your local setup.
In the domain overview select the tab “File Manager” and add your .env file in the correct location with the correct settings for the server.
When needed: make a zip of your local assets and upload them to your website via the “File manager”
# Migrating a new website from staging to production
- Go to "Customers" and find the client, if the client does not exist yet make sure to add the client. While adding a customer account you can set up a subscription, most of the time a "BEELDR Light" plan suffices but if you need more than one database pick the "BEELDR Standard" plan. Make sure to select the IPv6 address and secure the website with SSL, entering webhosting@beeldr.nl in the "E-mail address" field.
- Select the client from the list by clicking on it's name, in the newly opened screen select subscriptions, there are two scenarios, either there is no subscription yet or there already is a subscription with the current website.
# No subscription/website
- Follow the steps from "Setting up a website" with a few twists
- At step 10 import a dump from the staging database.
- At step 12 go to the staging subscription and via the File Manager create a zip file with your assets so you can import them into the live website.
# Existing website
- Go to the databases and export a dump of the database into het httpdocs folder
- Go to the file manager, select all files within the httpdocs folder and create an archive, download the archive and either send it to the customer for safekeeping or save it to the NAS.
- Select all files within httpdocs and remove them
- Go to Git and delete the repository if one is used
- Now Follow the steps from "Setting up a website" starting at step 3
- At step 10 import a dump from the staging database.
- At step 12 go to the staging subscription and via the File Manager create a zip file with your assets so you can import them into the live website.
# Change subscription service plan
- In plesk use the top search bar and open the domain you want to modify.
- In the most right column in your screen in the segment "Subscription info" click the domain listed after "Subscription:".
- Scroll down until in the most right column you see the "Account" section and click "Change plan/add-ons", select the subscription you need and press "OK".
- Again, scroll down until in the most right column you see the "Account" section, if it says "Unlock & sync" it means the parameters of the new service plan have not been applied to the subscription. Click the button to do so.
- In case the synchronisation fails it means you've chosen a non-suitable subscription, either make it fit or select a larger subscription and try again.
- In some cases there is no suitable subscription, for example a multi-site CMS where one of the domains has a different root folder, in that case select the subscription that suits the subscription best.
Under no circumstance use the customize button! Every subscription should be in a pre-defined plan, this is to prevent chaos when billing customers.