EXPLORE

Training

Design YOUR World

Hardware-accelerated generative layout containers built for extreme performance.

Convert RGBA to RGB if necessary (for PNGs with transparency)

TURN JPEGS AND PNGS INTO WEB PS

AI Overview

This Python code snippet uses the Pillow library to convert JPG and PNG images into WebP format. 

Prerequisites

You need to install the Pillow library:

bash

pip install Pillow

Code Snippet: Convert Single Image 

python

from PIL import Image
import os

def convert_to_webp(source_path, quality=80):    """Converts a jpg/png image to webp"""
    image = Image.open(source_path)    # Convert RGBA to RGB if necessary (for PNGs with transparency)
    if image.mode == 'RGBA':        image = image.convert('RGB')            output_path = os.path.splitext(source_path)[0] + ".webp"
    image.save(output_path, "webp", quality=quality)    print(f"Successfully converted {source_path} to {output_path}")

# Example usage:
# convert_to_webp("input.jpg")
# convert_to_webp("photo.png")

Code Snippet: Batch Convert Folder

This script will convert all JPEGs and PNGs in the specified folder. 

python

from PIL import Image
import os
import glob

def batch_convert_to_webp(folder_path, quality=80):    # Supported formats
    types = ('/*.jpg', '/*.jpeg', '/*.png')    image_files = []        # Get all files
    for t in types:        image_files.extend(glob.glob(folder_path + t))        for file in image_files:        try:            image = Image.open(file)            # Ensure proper conversion for different modes
            if image.mode == 'RGBA':                image = image.convert('RGB')                            output_path = os.path.splitext(file)[0] + ".webp"
            image.save(output_path, "webp", quality=quality)            print(f"Converted: {os.path.basename(file)}")        except Exception as e:            print(f"Error converting {file}: {e}")

# Run:
# batch_convert_to_webp("./images")

Key Considerations

  • Quality: The quality parameter (0–100) sets the WebP compression strength. A value of 80 is usually a good balance between quality and size.
  • Transparency: PNG files with transparency should ideally be saved with .convert('RGBA') or handled specifically if lossy compression is required, but .convert('RGB') is generally safer for standard web usage.
  • Batching: The batch script creates new files without deleting the original one

FOR WORDPRESS SNIPPET

In WordPress, the best way to handle this is by hooking into the upload process using a PHP snippet. This ensures that every time you upload a JPEG or PNG to your Media Library, a WebP version is automatically generated. 

Option 1: Custom Code (No Plugin)

You can add this snippet to your theme’s functions.php file or use a plugin like WPCode to manage it. This code uses the WordPress wp_handle_upload filter to detect new uploads and convert them using the server’s GD or Imagick library. 

php

/** * Automatically convert uploaded JPEG/PNG images to WebP */
add_filter('wp_handle_upload', 'convert_to_webp_on_upload');

function convert_to_webp_on_upload($upload) {    $file_path = $upload['file'];    $file_type = $upload['type'];    // Only target JPEG and PNG
    if (!in_array($file_type, ['image/jpeg', 'image/png'])) {        return $upload;    }    $editor = wp_get_image_editor($file_path);    if (!is_wp_error($editor)) {        $webp_path = str_replace(pathinfo($file_path, PATHINFO_EXTENSION), 'webp', $file_path);                // Save the WebP version
        $editor->save($webp_path, 'image/webp');                // OPTIONAL: Uncomment the line below to delete the original JPG/PNG after conversion
        // unlink($file_path); 
    }    return $upload;}

Use code with caution.

Note: If you delete the original file (using unlink), make sure your theme supports serving WebP to all browsers.

Option 2: Recommended Plugins

If you prefer a more robust solution that also handles existing images (bulk conversion), these plugins are highly rated: 

  • Converter for Media: Great for beginners. It converts your entire library with one click and serves WebP only to supported browsers.
  • Imagify: Best if you also want smart compression to further reduce file sizes.
  • WebP Express: A more technical option that offers multiple conversion methods like cwebp or vips

FINAL CODE SNIPPET

The Code Snippet

php

/** * Automatically convert new JPEG and PNG uploads to WebP. */
add_filter('wp_handle_upload', 'convert_to_webp_on_upload');

function convert_to_webp_on_upload($upload) {    // Only target JPEG and PNG files
    if ($upload['type'] == 'image/jpeg' || $upload['type'] == 'image/png') {        $file_path = $upload['file'];        // Check if the server has GD or Imagick extensions active
        if (extension_loaded('imagick') || extension_loaded('gd')) {            $image_editor = wp_get_image_editor($file_path);            if (!is_wp_error($image_editor)) {                $file_info = pathinfo($file_path);                $dirname   = $file_info['dirname'];                $filename  = $file_info['filename'];                // Create the new WebP file path
                $new_file_path = $dirname . '/' . $filename . '.webp';                // Save as WebP (quality set to 80)
                $saved_image = $image_editor->save($new_file_path, 'image/webp');                // If successful, update the upload array to point to the new WebP file
                if (!is_wp_error($saved_image) && file_exists($saved_image['path'])) {                    $upload['file'] = $saved_image['path'];                    $upload['url']  = str_replace(basename($upload['url']), basename($saved_image['path']), $upload['url']);                    $upload['type'] = 'image/webp';                    // DELETE the original JPG/PNG to save space (optional)
                    @unlink($file_path);                }            }        }    }    return $upload;}

How to Install via WP Code Snippets

  1. Go to Snippets > Add New in your WordPress dashboard.
  2. Give your snippet a title, like “Auto WebP Conversion on Upload.”
  3. Set the Code Type to PHP Snippet.
  4. Paste the code above into the editor.
  5. Set the Insertion Method to Auto Insert and Location to Run everywhere.
  6. Toggle the switch to Active and click Save Snippet

How do you use WordPress extractor?

how do you use wordpress extractor app?

The WordPress Extractor (often referred to as WPress-Extractor) is a specialized tool used to unpack .wpress files created by the popular All-in-One WP Migration plugin. You typically use this when you need to access specific files manually or if the standard plugin import process fails due to file size limits or server restrictions.

Using the WPress-Extractor Tool

You can use this tool on Windows, Mac, or Linux to extract your website files locally.

Download the Tool: Get the executable or source files from reputable sources like the Wpress-Extractor GitHub repository.

Prepare the Folder: Create a new folder on your computer and place both your .wpress backup file and the extractor tool inside it.

Method A: Drag and Drop (Windows/Mac):

On Windows, simply drag your .wpress file directly onto the wpress-extractor.exe file. A command prompt window will open and begin the extraction.

Method B: Command Line (All Platforms):

Open your terminal (Mac/Linux) or Command Prompt (Windows).

Navigate to your folder: cd /path/to/your/folder.

Run the extraction command: wpress-extractor filename.wpress.

Access Your Files: Once complete, the tool will create folders (like wp-content) containing your site’s media, themes, and database scripts.

Alternative Tools and Methods

If you prefer a different interface or have specific server requirements:

Traktor: A dedicated desktop application from the plugin developers themselves, used for browsing and extracting .wpress archives via a GUI.

Web Version: Use the online version of Traktor to browse backup contents directly in your browser.

NPM Command: If you have Node.js installed, you can use the command npx wpress-extract yourfile.wpress without downloading a separate app

once you have extracted the files how do you view them on local server?

To view your extracted WordPress files on a local server, you must move the files to a local development environment (like Local WP, XAMPP, or MAMP) and import the associated database.

Step 1: Set Up a Local Server

If you don’t already have one, install a local development tool:

Local WP: The easiest option specifically for WordPress.

XAMPP: A general-purpose local server for Windows, Linux, and Mac.

Step 2: Move Your Files

Locate Your Root Folder: On XAMPP, this is typically the htdocs folder. On Local WP, it’s under App > Public for your specific site.

Copy Extracted Files: Drag the files you extracted (including the wp-content folder and wp-config.php) into this directory. If you are using a tool like Local WP, it is often easier to create a fresh blank site first and then replace its wp-content folder with your extracted one.

Step 3: Import the Database

Your extraction should include a .sql file, which is your website’s database.

Open phpMyAdmin: Access this through your local server’s dashboard (e.g., http://localhost/phpmyadmin).

Create a New Database: Give it a name and select it.

Import: Click the Import tab, choose your .sql file, and click Go.

Step 4: Configure wp-config.php

Open the wp-config.php file in your local site’s root folder and update these lines to match your local database settings:

php

define( ‘DB_NAME’, ‘your_local_db_name’ );

define( ‘DB_USER’, ‘root’ );

define( ‘DB_PASSWORD’, ” ); // Usually empty for XAMPP

define( ‘DB_HOST’, ‘localhost’ );

Use code with caution.

Step 5: View Your Site

Open your browser and navigate to the local URL (e.g., http://localhost/your-site-folder or the domain provided by Local WP). If you see “404 errors” on inner pages, go to Settings > Permalinks in your WordPress dashboard and click Save Changes to refresh the URL structure.

Are you seeing any specific error messages like “Error Establishing a Database Connection” when you try to load the site?

THESE ARE THE “Ultimate” FREE WEB HOSTING PROVIDERS IN 2026

FACTS Listed:

  • InfinityFree


    GoogieHost


    Freehostia


    AwardSpace


    ByetHost


    FreeHosting.com


    ProFreeHost


    000Webhost


🌍 What “100% Free Hosting” Actually Means Today

Free hosting providers fall into three categories:

  • Traditional free shared hosting (PHP/MySQL, cPanel‑style)


  • Free static hosting (HTML/CSS/JS only)


  • Free cloud compute tiers (AWS/GCP serverless)


    Only the first category can run WordPress without major workarounds.


    🏆 100% Free Hosting Providers


    🟦 Traditional Free Hosting (PHP/MySQL)


    These are the ones closest to “real hosting” and can run WordPress.


  1. InfinityFree
    Unlimited bandwidth, free SSL, no ads, PHP/MySQL.


  2. GoogieHost
    Free cPanel‑style panel, SSL, CloudLinux, no forced ads.


  3. Freehostia
    250MB storage, 6GB bandwidth, PHP/MySQL.


  4. AwardSpace
    1GB storage, no ads, PHP/MySQL, free domain hosting.


  5. ByetHost
    Free cPanel‑like panel, PHP/MySQL, free subdomain.


  6. FreeHosting.com
    10GB storage, PHP/MySQL, no ads.


  7. ProFreeHost
    Unlimited bandwidth, PHP/MySQL, cPanel‑style.


  8. FreeWebHostingArea
    Old‑school but stable, no forced ads, PHP/MySQL.


  9. 000Webhost
    Free tier still exists, PHP/MySQL, no ads. (Hostinger itself is NOT free — only 000Webhost.)


    đźź© Free Static Hosting (HTML/CSS/JS only)


    These are extremely fast but cannot run WordPress without external backends.


  10. GitHub Pages
    Free forever, perfect for static sites.


  11. Netlify Free Tier
    Fast, modern, CI/CD, static only.


  12. Vercel Free Tier
    Great for Next.js and static sites.


  13. Cloudflare Pages
    Free static hosting with global CDN.


  14. Wix Free Plan
    Free hosting + builder, but no PHP/MySQL.


  15. Webflow Free Plan
    Free hosting for static pages, designer‑friendly.


    🟨 Free Cloud Compute (Not traditional hosting)


    These are technically free but require dev knowledge.


  16. AWS Lambda Free Tier
    Serverless compute, not a hosting panel.


  17. Google Cloud Run Free Tier
    Free container hosting for small workloads.


  18. Render Free Tier
    Free web services with autosleep.


  19. Fly.io Free Tier
    Free small VMs, but technical.


    (You listed AWS Lambda — correct, but it’s not “hosting” in the cPanel sense.)


    Which of these are actually usable for WordPress?


    Only these are realistic for WordPress:


  • InfinityFree


  • GoogieHost


  • Freehostia


  • AwardSpace


  • ByetHost


  • FreeHosting.com


  • ProFreeHost


  • 000Webhost


    Everything else is static or serverless.


    đź§© What to consider when choosing a free host


  • Storage limits (many free hosts give 250MB–1GB)


  • CPU throttling (free hosts often slow down under load)


  • Email support (many free hosts disable email)


  • SSL availability (InfinityFree + GoogieHost are best here)


  • Uptime (free hosts vary wildly)


  • Ads (avoid hosts that inject ads — none listed above do)



INSTALL MICROSOFT STORE

Installing Microsoft Store on Windows 10 LTSC using PowerShell

  1. Download the Microsoft Store Package:

    • You can download the necessary files from this GitHub repository.
  2. Extract the Package:

    • Extract the downloaded ZIP file to a folder on your system.
  3. Open PowerShell as Administrator:

    • Press Windows + X and select "Windows PowerShell (Admin)".
  4. Navigate to the Extracted Folder:

    powershell

    cd pathtoextractedfolder
  5. Run the Installation Script:

    powershell

    .Add-Store.cmd
  6. Follow the On-Screen Instructions:

    • The script will guide you through the installation process. Make sure to follow the prompts.
  7. IF YOU ENCOUNTER ERRORS

    Steps to Fix the Issue

    1. Uninstall the Existing Package:

      • Open PowerShell as an administrator.

      • Run the following command to uninstall the existing package:

      powershell

      Get-AppxPackage -Name Microsoft.VCLibs.140.00 | Remove-AppxPackage
    2. Install the New Package:

      • After uninstalling the existing package, try installing the new package again:

      powershell

      Add-AppxPackage -Path "pathtoMicrosoft.VCLibs.140.00_14.0.26706.0_x64__8wekyb3d8bbwe.appx"
    3. Check for Dependencies:

      • Ensure that there are no other dependencies or packages that might conflict with the installation.
    4. Use the Get-AppPackageLog Command:

      • If the issue persists, use the Get-AppPackageLog command to get more details about the error:

      powershell

      Get-AppPackageLog -ActivityID f66dbf9e-88cc-0000-67aa-74f6cc88db01
    5. Restart Your Computer:

      • Sometimes, a simple restart can resolve the issue by clearing any temporary conflicts.

      Steps to Resolve Access Denied Error

      1. Run PowerShell as Administrator:

        • Ensure you are running PowerShell with elevated privileges. Right-click on the PowerShell icon and select "Run as administrator."
      2. Check Permissions:

        • Verify that you have the necessary permissions to access the folder. You can do this by navigating to the folder in File Explorer, right-clicking on it, selecting "Properties," and then checking the "Security" tab.
      3. Take Ownership of the Folder:

        • If you don’t have the necessary permissions, you can take ownership of the folder:

        powershell

        takeown /f "C:Program FilesWindowsAppsMicrosoft.VCLibs.140.00_14.0.33519.0_x64__8wekyb3d8bbwe" /r /d y
        icacls "C:Program FilesWindowsAppsMicrosoft.VCLibs.140.00_14.0.33519.0_x64__8wekyb3d8bbwe" /grant administrators

TAKING OWNERSHIP OF MICROSOFT APPS FOLDER

Take Ownership of the Folder:

  • If you don’t have the necessary permissions, you can take ownership of the folder:

    powershell![image-20250227230400478](C:UsersSTAFF IoMAppDataRoamingTyporatypora-user-imagesimage-20250227230400478.png)

    the below is the correct COMMAND

    takeown /f "C:Program FilesWindowsAppsMicrosoft.VCLibs.140.00_14.0.33519.0_x64__8wekyb3d8bbwe" /r /d y
    icacls "C:Program FilesWindowsAppsMicrosoft.VCLibs.140.00_14.0.33519.0_x64__8wekyb3d8bbwe" /grant administrators:F /t

Run CHKDSK:

  • Open Command Prompt as an administrator.

  • Run the following command:

    cmd

    chkdsk C: /r
  • This will check for and repair any disk errors. You may need to restart your computer for the scan to complete.

Use DISM Tool:

  • Open Command Prompt as an administrator.

  • Run the following commands one by one:

    cmd

    DISM /Online /Cleanup-Image /CheckHealth
    DISM /Online /Cleanup-Image /ScanHealth
    DISM /Online /Cleanup-Image /RestoreHealth
error: Content is protected !!