Changing PHP settings

There are some ways to change the values of your PHP settings. The easiest way is through your site htaccess or adding php.ini in your site directory.

The first thing you need to know is the PHP info. To know the PHP default values just create/upload a file in your site folder containing the phpinfo() code/function then load it in your browser.

1. Create a file in your local then name it as “myphpinfo.php”.

2. Insert/Paste the following code

<?php phpinfo(); ?>

3. Upload the file inside your “public_html” folder

public_html/myphpinfo.php

4. Go to your browser address bar then type

http://yourdomain.com/myphpinfo.php

Note: Once you are done checking the values you need it is recommended to delete this file from your site.

To change the PHP values:

1. Create “.htaccess” file in your local.

Important: If there is already an .htaccess file in your site it is recommended to use it and just edit from your local.

2. Insert the code in your htaccess depending on what you want to change.

Increase the upload size value:

php_value upload_max_filesize 20M
php_value post_max_size 20M
php_value max_input_time -1

Increase memory limit:

php_value memory_limit 256M

Increase max execution time:

php_value max_execution_time 300

3. After making the changes in your htaccess you can upload/replace the file in your site.

 

Adding a Cron Job in Vesta Hosting Panel

Many website scripts require cron jobs to perform tasks at set intervals. It is very easy to add a cron job via the Vesta hosting panel. This guide will walk you through the steps.

Continue reading Adding a Cron Job in Vesta Hosting Panel

Managing VestaCP Backups

Backups are meant for disaster recovery. They are used to restore as much data that is possible to recover. IT IS NOT meant for reverting codes/content or data in the database unless there is no other way. We recommend getting a dev/staging site or dev/staging server.

Restoring from a backup will restore your entire site to the backup date.

It is very important to manage your backups. Please keep in mind that we only provide the storage and manage the storage servers. We do not make any guarantee on backup data/file integrity. Backup systems are very complex. As much as possible you need to keep your backup size small. Large backup sizes usually get corrupted.

To create a backup in your hosting panel:

user > (webuser) > login as (webuser) > backup >create backup

To download your backups:

Log in to your offsite server backup via FTP.

To adjust the backup time or frequency:

cron > “sudo /usr/local/vesta/bin/v-backup-users” > edit

You can change the cron time/schedule to fit your needs.

To change the backup count/total:

packages > your web package > edit

Backups: 3

Change “3” to your desired total number of backups to be generated.

Optimizing your backup:

1. Offload/Separate your media files into another storage

Uploading your photos/images/video/music to another storage system will make your site size very small. You can use our Storage Servers or FTP Storage.

2. Exclude directories

In your hosting panel

user > (Webuser) > “LOGIN AS (WEBUSER)” > backup > backup exclusions > configure

Web Domains:
yourdomain.com:public_html/wp-content/uploads

In the example entry above it is the WordPress media directory. Most of the files in the “uploads” directory are user uploaded content. Images and other media files are hard to compress making the backup size huge and prone to data corruption.

3. Remove unused files or archives

In best practice, you should not store files or achives inside the “public_html” or even inside your user root directory “/home/yourwebuser”. The backup system will process all files inside each web user directory.

Free Email Service Details

The Free E-mail Service is to provide managed hosting clients with simple e-mail services. You can use it to host your e-mail. We suggest to use this service for general purposes only ( eg. e-mail verification).  Web servers should only be used to host your websites. It is recommended to host your email on a separate environment. Should you need to reinstall your web server or restore from backup, your emails will still be available.

Continue reading Free Email Service Details

Restarting Services of Your Server in VestaCP

To restart/stop/start server services such as MySQL, Apache, Nginx and other systems running in your server just log in to your hosting panel and go to “Server”.

500 Internal Server Error

One of the most common issue in hosting is getting the “500 Internal Server Error”. When that happens try to restart your web server (Apache).

server > apache > restart

 

Database/MySQL crash:

If your database has crashed you can restart “MySQL“.

server > mysql > restart

We recommend to “stop” first the “Apache”, then stop/start the “MySQL”.

 

Warm Reboot:

To restart the server you can click “Restart” under hostname.

server > yourhostname > restart

If there are issues we suggest to try first to stop/start/restart the Apache and MySQL before deciding to restart the server. If there are still issues then you can try to restart the server.

 

 

Managing Your Firewall in Vesta

Managing your firewall from the command line is a bit hard. We have pre-configured firewall rules applied in your server. This is for extra security.

To easily make changes in the firewall rules just log in to your hosting panel thenĀ go to “Firewall”. It is best to suspend rules that you don’t use.

You can add rules by clicking the “plus” icon or “Add rule.”

To ban an IP address:

firewall > list fail2ban > ban IP address

IMPORTANT: Do not suspend or delete the “PING” rule.

Changing Server Language or Timezone in Vesta

To change the server timezone or language, you need to log in to your Vesta hosting panel using the “admin” user.

Navigate to server > configure

configure vesta

Change your Timezone and/or language as you want them and click “Save”.

vesta timezone or language

Note: The big “cog” or gear icon is the server configuration button. You can also click the “configure” link under the hostname.

%d bloggers like this: