Knowledge base

Search for the articles here or browse the categories below.

Browse by topic

Find guides, tutorials, and answers organised by category.

Popular articles

What other people are reading right now.

CPANEL WEB HOSTING

How to Create a phpinfo

Creating a phpinfo page is an essential task for anyone managing a website, especially for WordPress users who might not be developers but still need to keep their site running smoothly. The phpinfo() function is a powerful PHP feature that displays your site's current PHP configuration, providing detailed information about the PHP environment, including versions, extensions, and server data. This can be particularly useful for debugging or ensuring your server meets the requirements for specific applications. How to Create a phpinfo Page 1. Log into Your cPanel: Access your Hostyt cPanel account to begin the process. 2. Access File Manager: Navigate to the Files section and open the File Manager. 3. Navigate to the Public_html Folder: Choose the directory where you want the phpinfo page to be accessible. 4. Create a New File: Click the +File button at the top menu and name the file phpinfo.php or any other name you prefer, keeping the .php extension. 5. Edit the New File: Locate the phpinfo.php file in your file list, right-click on it, and select Edit. 6. Insert the phpinfo() Code: Paste the following PHP code into your file: <?php phpinfo(); ?> 7. Save Your Changes: After entering the code, click Save Changes to update the file. Viewing Your PHP Settings To access your phpinfo page and view your PHP configuration: - Open a web browser and visit https://yourdomain.com/phpinfo.php, replacing "yourdomain.com" with your actual domain name. - Use the browser's search function to find specific PHP settings or values you're interested in. Important Security Note The phpinfo page contains sensitive information about your PHP environment. To protect your site: - Delete the phpinfo Page: Remove the file when you no longer need it to prevent unauthorized access. - Rename the File: If you prefer not to delete it, consider renaming the file to something unique and less predictable than phpinfo.php to avoid detection by bots. Remember to choose a name you can recall easily. By following these steps, you've successfully created a phpinfo page on your Hostyt hosting account, allowing you to check your PHP settings conveniently from your web browser.

CPANEL WEB HOSTING

Timezones setting in PHP

Adjusting the timezone for PHP in your hosting environment is a straightforward process that significantly impacts the functionality of PHP-based applications, especially when managing date and time operations. By default, Hostyt servers use Coordinated Universal Time (UTC). However, customizing the timezone to match your local time can be done by modifying the date.timezone directive in the php.ini file. Setting the Timezone in PHP.ini Here’s how you can set your desired timezone for PHP in your Hostyt hosting account: 1. Access cPanel: Log into your Hostyt cPanel. 2. Navigate to File Manager: Scroll to the Files section and click on File Manager. 3. Locate the public_html Folder: In the File Manager, find and click on the public_html folder. 4. Find or Create php.ini: Within public_html, look for the php.ini file. If it doesn't exist, create a new one by clicking the +File button, naming it php.ini, and clicking Create New File. 5. Edit php.ini: Right-click on the php.ini file and select Edit. 6. Insert Timezone Code: At the top of the php.ini file, add the following line, replacing "Europe/Warsaw" with your preferred timezone: date.timezone = "Europe/Warsaw" Ensure to replace "Europe/London" with the appropriate timezone for your location. 7. Save Changes: After adding the timezone setting, click Save Changes. Verifying Your Timezone Setting To confirm that your timezone setting has taken effect: - Visit your phpinfo page (e.g., https://yourdomain.com/phpinfo.php), ensuring you replace "yourdomain.com" with your actual domain. This page will display your current PHP configuration, including the updated timezone setting. Remember, setting an accurate timezone in your php.ini file is essential for the proper execution of date/time functions in your PHP applications and can also resolve errors related to date/time settings in your web server logs. For detailed instructions on creating a phpinfo page, go here.

CPANEL WEB HOSTING

PHP Version, Execution Times and Memory Limit Configuration

Managing a web hosting environment involves various configurations to optimize the performance and compatibility of your websites. Hostyt provides comprehensive tools and features in cPanel to manage PHP settings, catering to a wide array of needs from executing scripts efficiently to running applications requiring different PHP versions and increasing memory limits for robust script execution. 1. Changing PHP Version Hostyt’s cPanel offers flexibility in selecting the PHP version specific to your website's requirements, enhancing security, performance, and compatibility. - Access the Software Section: Log into cPanel, navigate to the "Software" section, and locate the "Select PHP Version" tool. - Select and Set PHP Version: Choose the required PHP version and click "Set as current". You can also enable or disable specific PHP modules for the selected version. - PHP Options: In the "Options" tab, you can adjust settings like upload_max_filesize, max_execution_time, and more to suit your website’s needs. 2. Setting Custom PHP Execution Times Increasing the PHP maximum execution time is necessary for running scripts that take longer than the default limit, such as site migrations or large file operations. - PHP Selector Tool: After logging into cPanel, use the PHP Selector tool to access php.ini values and locate max_execution_time. - Adjust Execution Time: Change the value to accommodate your script's needs, ensuring smoother execution of longer-running scripts. 3. Running Different PHP Versions on Subdomains/Addons Hostyt enables you to configure specific PHP versions for subdomains or addon domains directly from the .htaccess file, ensuring compatibility across different parts of your website. - Edit .htaccess: Access the File Manager, navigate to the directory of your addon domain or subdomain, and edit the .htaccess file. - AddHandler Directive: Insert the appropriate PHP version handler, e.g., AddHandler application/x-httpd-alt-php74___lsphp .php for PHP 7.4, or AddHandler application/x-httpd-alt-php56___lsphp .php for PHP 5.6, customizing the environment per directory. 4. Increasing PHP Memory Limit Adjusting the PHP memory limit is crucial for scripts that require more resources, preventing errors related to memory exhaustion. - PHP Version Menu: In cPanel's "Software" section, select the PHP version menu and go to the Options for php.ini values. - Modify Memory Limit: Increase the memory_limit value as needed to support your website's operations, confirming changes with a success message. Implementing PHP Configurations These configurations empower you with the flexibility to tailor the hosting environment to your specific requirements. Hostyt's cPanel facilitates easy management of these settings, ensuring your websites run optimally. Remember to verify changes using a phpinfo() page and to revert or adjust configurations as needed based on website performance and functionality.

CPANEL WEB HOSTING

How to Force SSL

After installing SSL on your site, if you don't see the secure padlock icon or "HTTPS" preceding your domain, it might still load with "HTTP" and display an unsecured warning to visitors. This issue often arises from having insecure links on your site, but it can be resolved by manually enforcing SSL. First, ensure that SSL is properly installed on your site. You can verify this by using tools like www.sslshopper.com. After confirming the SSL installation, use www.whynopadlock.com to diagnose why the browser isn't displaying a secure padlock for your site. To address this issue: 1. Enter your site’s full URL on WhyNoPadLock to get a detailed report on your SSL status. 2. If advised to enforce HTTPS, note down the provided code for later use. Next, to implement HTTPS enforcement: 1. Navigate to the File Manager in your hosting panel. 2. Access the public_html folder and find the .htaccess file. If it’s not visible, you may need to create it or adjust your settings to unhide it. 3. Look for RewriteEngine On within the file, then add the following lines of code directly below it, replacing yourdomain.com with your actual domain name: RewriteEngine On RewriteCond %{HTTP_HOST} yourdomain.com [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://yourdomain.com/$1 [R,L] 4. Save your changes to the .htaccess file. Finally, refresh your browser to see the changes on your site. You can also recheck your SSL status on WhyNoPadlock to confirm the security padlock is now visible.

CPANEL WEB HOSTING

Managing Domains in cPanel

Hostyt's cPanel includes a comprehensive Domains section, unifying Redirects, Subdomains, and Addon Domains into a singular interface for streamlined domain management. To access, log into cPanel, proceed to the Domain section, and select Domains. Here, you can: - Create New Domains/Subdomains: Add domains or subdomains to your account seamlessly. - Manage Existing Domains: View, delete, or modify the settings of your existing domains. Creating Domains and Subdomains Easily add an addon domain or subdomain right from the Domains interface, provided your DNS is correctly pointed to Hostyt. For detailed instructions, refer to our knowledge base. Managing Your Domains This interface lets you create new sites, set up email addresses, adjust document roots, manage DNS records, and more. Simply navigate to cPanel -> Domains -> Manage to edit any domain. - Document Root: Access and manage the root folders for each domain. - Domain Information: View details about your domains, subdomains, and their redirects. - Redirects: Manage domain redirects directly from this section. - Create Email: Add email addresses to your domain effortlessly. - Modify DNS Zones: Use the Zone Editor to manage DNS records for your domains and subdomains. Removing a Domain Should you need to remove a domain from your cPanel, this can be done with ease, ensuring you back up your data beforehand. Note that removing a domain does not automatically delete associated mail folders.

CPANEL WEB HOSTING

cPanel Hosting Overview

What is cPanel? cPanel is a widely-used Linux hosting control panel that simplifies website management. It's included with many hosting packages, though some providers require a separate subscription. With its graphical interface, cPanel provides an efficient way to monitor server performance and access various modules for managing Preferences, Files, Databases, Web Applications, Security, Metrics, Domains, Software, Email, and Advanced Features. Accessing Your cPanel To manage your website hosting with Hostyt, we offer the cPanel control panel. Here’s how you can log into your cPanel: 1. Direct Login: Access cPanel directly by navigating to https://yourdomain.com/cpanel. You’ll need your cPanel username and password. If you encounter any login issues or need to reset your password, please contact our support team for immediate assistance. 2. Through Your Client Area: Alternatively, log in at my.host.yt, navigate to 'Services,' select your hosting, and click on the 'Control Panel' button to access cPanel. Getting Started with cPanel - Installing Software: Install software manually following installation guides, or utilize our auto-installers for ease of setup on platforms like Magento, Joomla, and WordPress. - Databases: Most applications, including WordPress, use databases alongside files. You can create unlimited databases manually or through auto-install software. - Managing Files: Manage your site's files via the public_html folder. Options include SSH, SFTP, FTP (via applications like FileZilla), or the built-in file manager. - SSL Certificates: Hostyt provides free SSL certificates with every hosting account, with automatic renewal and provisioning for hassle-free security. - Email Accounts: Create email accounts with your hosting account. These can be full mailboxes or set to forward to another address. You can also configure MX records to integrate with external providers like Office 365 or Google G Suite. Optimization and Performance Hostyt's hosting is configured to minimize downtime and enhance your website’s performance. While we optimize for the best site loading speeds by default, further optimizations from your end, such as updating the PHP version, can contribute to improved site performance.