Category Archives: Web Applications

How to Update Moodle to Work with a New Domain

If you need to move your Moodle site to a new domain or make it accessible from a different URL, you must update its configuration settings. The key step is modifying the config.php file in Moodle’s main directory.

Step 1: Locate the config.php File

The config.php file is located in the root folder of your Moodle installation. You can access it via FTP, your hosting file manager, or SSH, depending on your setup.

Step 2: Edit the wwwroot Setting

Open config.php with a text editor. Look for the line that defines the site’s URL, which looks like this:

$CFG->wwwroot = 'http://olddomain.com';

Replace the old domain with your new domain name. For example:

$CFG->wwwroot = 'http://newdomain.com';

Make sure to use the correct protocol (http or https) based on your SSL setup.

Step 3: Save Changes and Clear Cache

After updating the URL, save the file and upload it back to the server if you edited it locally. Then, clear your browser cache to ensure Moodle loads from the new domain without issues.

Step 4: Verify the Site

Visit your new domain in a browser and check that your Moodle site loads correctly. Test a few pages and login to confirm all internal links now point to the new domain.

Important Notes:

  • If your Moodle site uses additional plugins or external integrations, make sure they also reference the new domain.
  • Back up your config.php file before making changes to avoid accidental misconfigurations.

By updating the $CFG->wwwroot value, your Moodle site will now function properly under the new domain, ensuring a smooth transition for your users.

Experience fast, secure, and reliable Moodle hosting with TrexHost—launch your site today and enjoy worry-free performance.

How to Adjust Product Image Quality in PrestaShop for Optimal Website Performance

PrestaShop, starting from version 1.4.4.1, offers store administrators the ability to manage the quality of their product images directly from the admin panel. This feature is valuable for those running large e-commerce websites, where high-quality images can sometimes impact loading speeds, especially if there are numerous products on display.

In this guide, we’ll walk you through the process of adjusting your product image quality in PrestaShop and explain how these changes can improve both image load times and overall website performance.

Step 1: Uploading Product Images

First, ensure you have your product images ready to upload. To do this, log in to your PrestaShop admin area, and navigate to:

Catalog > Products

  1. Choose the product you want to add or update images for.
  2. Open the Images tab within the product page.
  3. Here, you can browse and upload images for the selected product. You can upload multiple images for each product, which is great for showcasing different angles or variations.

Step 2: Adjusting Image Quality

Once your images are uploaded, it’s time to adjust their quality settings. This is done through the Preferences section in your admin panel.

Navigate to:

Preferences > Images

In this section, you’ll see options to modify the image quality for different formats. PrestaShop allows you to set quality values for JPEG and PNG formats, which are the most common file types used for product images.

  • JPEG Quality: You can adjust the quality from a range of 0 (lowest) to 100 (highest). Reducing the JPEG quality can result in smaller file sizes, but be mindful that too low of a quality setting may cause the images to appear pixelated or blurry.
  • PNG Quality: Similar to JPEG, PNG images can also be adjusted in terms of quality. However, unlike JPEG, PNG is a lossless format, meaning it retains more detail even at lower quality settings, although file sizes may remain relatively large compared to JPEG.

Step 3: Balancing Image Quality and Website Speed

When managing an online store, particularly one with many products, balancing image quality and performance is key. High-quality images can improve the user experience, but they can also slow down page load times, which affects SEO rankings and conversion rates.

  • Performance Considerations: For large stores with hundreds or thousands of products, it might be worthwhile to decrease image quality slightly to speed up loading times. While this may slightly reduce image sharpness, it can significantly boost your website’s overall performance.
  • Optimizing for Mobile Users: Remember that many users will visit your site on mobile devices, where slower connections are common. Lowering image quality without sacrificing too much visual appeal can lead to faster loading times, especially for mobile visitors.

Step 4: Regenerating Thumbnails

After adjusting the image quality settings, the final step is to regenerate your thumbnails. This process ensures that all previously uploaded product images are resized and optimized according to the new quality settings. To regenerate thumbnails:

  1. In the Images settings under Preferences, locate and click the button that says Regenerate Thumbnails.
  2. This will start the process, and PrestaShop will automatically resize all images according to your new settings.
  3. Depending on the number of products and images, this could take some time to complete, so be patient.

Step 5: Clear Your Cache and Check the Results

Once the regeneration process is finished, it’s essential to clear your browser’s cache to view the changes. To do this, simply:

  1. Clear the cache from your PrestaShop admin panel.
  2. Refresh your product pages to check the result.

By following these steps, your product images should load faster without sacrificing too much quality, leading to a more efficient and user-friendly website.

Final Thoughts

Adjusting image quality in PrestaShop is a simple yet effective way to improve website performance. Lowering image quality can significantly reduce file sizes, resulting in faster page loading times, which is particularly important for large online stores. However, it’s important to find a balance—ensure your images still look professional and appealing while optimizing for speed. With the right settings, you can achieve a great user experience without compromising on performance.

Launch your online store with TrexHost’s optimized PrestaShop hosting—offering blazing-fast speeds, free SSL, daily backups, and 24/7 support.