Hosting Google Fonts locally on your WordPress site is an excellent way to boost your site’s performance, improve privacy compliance (like GDPR), and give you more control over your assets. Here are the most effective ways to do it, ranging from easiest to most hands-on.
This is the best method for most users, as it’s automated and requires no coding. Several excellent free plugins in the WordPress directory can scan your site, download the fonts, and rewrite the URLs for you.
Here are a few top recommendations based on the search results:
| Plugin Name | Key Features | Best For | Hands-on Setup Required |
|---|---|---|---|
| LocalFonts | Zero configuration, catches hardcoded links and @import rules, auto-downloads fonts via WP-Cron, removes connection hints to Google. | Users who want a “set it and forget it” solution that works automatically after activation. | No |
| EasyFonts | Lightweight (30kb), handles Google Fonts and Bunny Fonts, supports @font-face in inline styles, compatible with page builders. | Users who need a lightweight solution that also supports the privacy-friendly Bunny Fonts. | Minimal (configure in settings) |
| Local Google Fonts | Settings page to choose which fonts to load, option for automatic loading, helps with GDPR compliance. | Users who want more control over which specific fonts are loaded locally. | Moderate (choose fonts in settings) |
| Fonts Manager | Automatically scans pages, retrieves Google Fonts URLs, downloads and replaces links. | Users who want a simple, automatic scanning and hosting process. | Minimal |
General Installation Steps:
To verify it’s working, use your browser’s developer tools (F12), go to the Network tab, filter by “Fonts”, and reload your page. You should no longer see requests to fonts.googleapis.com or fonts.gstatic.com .
If you already use a comprehensive caching and performance plugin, it likely has this feature built-in, saving you from installing an extra plugin.
For developers or those who prefer a code-based approach, manual self-hosting is a viable option. It’s more work but gives you complete control over the files .
The Process:
.ttf (TrueType) files..woff2 format for best performance and browser support. Use a free online converter (like CloudConvert) to convert the .ttf files to .woff2..woff2 files to a new folder inside your (child) theme’s directory, for example, /wp-content/themes/your-child-theme/fonts/.@font-face: Add the CSS code to declare your new font family. This should be added to your child theme’s style.css file or via the WordPress Customizer’s “Additional CSS” section.css @font-face { font-family: 'My Local Font'; src: url('/wp-content/themes/your-child-theme/fonts/my-font.woff2') format('woff2'); font-weight: normal; font-style: normal; font-display: swap; }font-family rule to apply your locally hosted font to specific elements like headings or body text.css body { font-family: 'My Local Font', Arial, sans-serif; }Hope this helps you get your fonts hosted locally. What WordPress theme or page builder are you currently using? Knowing that might help narrow down the plugin choice, as some work better with specific builders like Divi or Elementor .
Setting up a WordPress website on Oracle Cloud’s free tier is a great way to build a site with no upfront costs. The process involves setting up your cloud environment, creating a virtual machine, and then installing the web server, database, and WordPress itself.
Here is a step-by-step guide to walk you through the entire process using an Ubuntu Linux instance.
Before you begin, ensure you have:
A compartment is a logical container for your cloud resources, helping you organize and manage them.
This is where your WordPress site will live.
VM.Standard.E2.1.Micro (AMD) or an Arm-based one. This confirms you won’t be charged .To make your website accessible from the internet, you need to open port 80 (for HTTP) and optionally port 443 (for HTTPS) in both the cloud firewall and the instance’s internal firewall.
Part A: Configure the Cloud Firewall (Ingress Rules)
0.0.0.0/0 (This allows traffic from anywhere on the internet)Now, you’ll connect to your virtual server from your local computer.
<private-key-file> with your key’s filename and <public-ip> with the IP address you copied.bash ssh -i <private-key-file> ubuntu@<public-ip>yes and press Enter .Once connected to your server via SSH, you’ll install all the necessary software.
sudo apt updatesudo apt install -y apache2 mysql-server php libapache2-mod-php php-mysql php-curl php-gd php-xml php-mbstring php-zip php-jsoniptables). These commands make the rules persistent after a reboot .bash sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 80 -j ACCEPT sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 443 -j ACCEPT sudo netfilter-persistent saveIt’s essential to set a password and remove insecure defaults from your new database installation.
sudo mysql_secure_installation You will be guided through a series of prompts:
VALIDATE PASSWORD COMPONENT? (Optional, but recommended for security).root user.Y to remove anonymous users.Y to disallow root login remotely.Y to remove the test database.Y to reload privileges tables.bash sudo mysql -u root -p'your-database-password' with a strong, unique password) :sql CREATE DATABASE wordpress; CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'your-database-password'; GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost'; FLUSH PRIVILEGES; EXIT;Now, you’ll download WordPress and set the correct file permissions.
cd /tmp curl -O https://wordpress.org/latest.tar.gzsudo tar zxf latest.tar.gz -C /var/www/html/ --strip 1bash sudo chown -R www-data:www-data /var/www/html/ sudo chmod -R 755 /var/www/html/bash sudo mkdir -p /var/www/html/wp-content/uploads sudo chown -R www-data:www-data /var/www/html/wp-content/uploadsThe final steps are done through a simple web-based wizard.
http://<your-public-ip-address>wordpresswpuser<your-database-password>localhost (since the database is on the same server)wp_ (or change if you wish).Congratulations! You now have a fully functional WordPress website running on Oracle Cloud’s free tier.
yourwebsite.com) and point it to your server’s IP.sudo apt update && sudo apt upgrade on your server and keep your WordPress themes and plugins updated to ensure security.Of course! Setting up a WordPress website on your local computer is an excellent way to learn, test themes/plugins, or build a site before it goes live. This local environment is often called a “local server” or “development environment.”
Here’s a comprehensive guide on how to do it.
There are two primary ways to set up WordPress locally. I highly recommend Method 1 for beginners.
Local is a free, modern, and very user-friendly tool designed specifically for WordPress. It works on Windows, Mac, and Linux.
Step 1: Download and Install Local
Step 2: Create a New Site
my-test-site). This will also be your local domain (e.g., my-test-site.local).Step 3: Start Your Site
Step 4: Access Your Site and Dashboard
http://my-test-site.local).http://my-test-site.local/wp-admin). Log in with the username and password you created in Step 2.Congratulations! You now have a fully functional WordPress website running on your computer.
XAMPP is a free, all-in-one package containing Apache (web server), MySQL (database), and PHP. It’s very powerful but requires a few more manual steps.
Step 1: Download and Install XAMPP
C:\xampp (Windows) or Applications/XAMPP (Mac).Step 2: Start the Servers
Step 3: Download WordPress
wordpress.wordpress folder into your XAMPP’s htdocs directory (e.g., C:\xampp\htdocs\).wordpress folder to whatever you want your site’s folder to be called (e.g., mysite).Step 4: Create a Database
http://localhost/phpmyadmin.mysite_db) and click “Create.” Remember this name.Step 5: Run the WordPress Installation
http://localhost/mysite (replace mysite with the name of the folder you created in Step 3).mysite_db).rootlocalhostwp_ (you can leave this as default).Step 6: Log In
http://localhost/mysite/wp-admin with the username and password you just created.When your local site is ready for the world, you will need to “migrate” it to a live web hosting server. This process involves:
Many plugins (like Duplicator or All-in-One WP Migration) and the Local software itself have tools to make this migration process much easier.
For almost all users, starting with “Local by Flywheel” is the fastest, simplest, and most reliable method.
Making your locally-built WordPress site accessible to the public is a common next step for sharing your work or getting client feedback. There are two main paths you can take: a temporary solution using a tunnel for quick previews, or a permanent solution by migrating to a live hosting provider.
Here is a comparison of both methods to help you decide.
| Aspect | 🚀 Method 1: Temporary Access (via “Tunneling”) | 🌐 Method 2: Permanent Access (via Migration) |
|---|---|---|
| What It Is | Exposing your local computer to the internet using a tool (e.g., ngrok) to get a temporary public URL . | Moving your site’s files and database to a paid hosting provider (e.g., Bluehost, Kinsta) to go live permanently . |
| Best For | Quick client previews, testing plugins that need a public URL (like Jetpack), or gathering feedback on a work-in-progress . | Launching the final website, making it available 24/7 to the public, and getting your own domain name (e.g., www.yoursite.com) . |
| Pros | Free/Low Cost: Many tools offer a free tier . Immediate: No need to buy hosting or a domain upfront. Convenient: You continue working in your familiar local environment. | Professional: Provides a custom domain, better speed, and uptime . Always Online: Your computer doesn’t need to stay on . Secure: Hosting providers offer robust security and backups. |
| Cons | Computer Must Be On: Your PC must be running and awake for anyone to access the site . Temporary & Slow: The URL is often a random string of letters and can be slow . Security Risk: You are opening your local computer to the internet. | Costs Money: You’ll need to pay for a hosting plan and a domain name . More Complex: Requires a few technical steps to migrate the site, though many hosts offer one-click migrations . |
This is the best way to show a work-in-progress without buying anything. Tools like ngrok or Localtunnel create a secure tunnel to your computer .
How to do it (using ngrok as an example):
ngrok http 80 (use port 8080 if that’s what your local site uses) .https://abc123.ngrok.io). Anyone with this link can see your site.⚠️ A Critical Step for WordPress: Because your site’s internal links and images are hardcoded to http://localhost, clicking on them will break for remote users . To fix this, you must update your site’s URL. Add these two lines to your wp-config.php file (replace the URL with the one from ngrok):
define( 'WP_HOME', 'https://your-ngrok-url.ngrok.io' );
define( 'WP_SITEURL', 'https://your-ngrok-url.ngrok.io' );
After you are done previewing, remember to remove these lines to work locally again .
When you are ready to launch the final site, you should move it to a live server. This is the standard professional process.
How to do it (The 30,000-foot view):
.sql file) ..sql file into it .wp-config.php file with the live server’s database name, username, and password .http://localhost to http://yourdomain.com. You can do this in phpMyAdmin by changing the siteurl and home fields in the wp_options table .Pro Tip: For a simpler migration, look for a host that offers a free migration plugin (like Jetpack’s migration tool or a host-specific plugin) to handle the heavy lifting for you .
If you decide to go with the permanent migration and need help picking a hosting provider or a plugin to simplify the process, feel free to ask
This is the end of content for WordPress question.
No more pages for WordPress question.