Images Not Displaying in wordpress Website

It is blocked by a security setting in  .htaccess file called Hotlink Protection.

How it was solved 

  1. To fix this, you’ll need to update the .htaccess file in your public_html folder to include your site’s domain in the allowed list, or you can disable Hotlink Protection entirely in cPanel.
  2. Go to the public_html folder of moeletsioabasotho.co.ls. Look for the lines starting with ‘RewriteCond %{HTTP_REFERER}’ and ‘RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ – [F,NC]’ and remove that entire block. The entire block was removed.When the file is not vissible The .htaccess file is hidden by default because it starts with a dot. To see it, you’ll just need to adjust a setting in the File Manager.

Log in to the cPanel account for the domain. Go to the SOFTWARE section and click SELECT PHP VERSION. Click on the OPTIONS tab at the top. Find UPLOAD_MAX_FILESIZE and enter the value (e.g., 4G). IMPORTANT: For this to work correctly, you’ll also need to ensure that POST_MAX_SIZE is set to at least 4G, and your MEMORY_LIMIT is set high enough to support these large uploads.

That’s a great approach. When explaining this to your clients, you can let them know that for a website to be secure, two things need to happen in order: DNS Propagation: When a domain is first added or pointed to a new server, the internet needs time (usually a few hours) to “learn” the new location. SSL Activation: Our security system (AutoSSL) can only issue a secure certificate once it can verify the domain is fully pointing to our server. If the DNS is still updating, the security check will wait and try again later. If they’re in a hurry, you can show them how to trigger it manually in their cPanel: • Go to the SECURITY section and click SSL/TLS STATUS. • Click the RUN AUTOSSL button. This forces the system to check the domain immediately rather than waiting for the next scheduled automatic check. Does that give you a good way to explain it to them?

Here are the steps to get the database ready in your cPanel: In the DATABASES section, click MySQL Database Wizard. Create a name for your database (e.g., ims_fms) and click Next Step. Create a username and a strong password, then click Create User. Make sure to keep these details handy! Select ALL PRIVILEGES and click Make Changes. Once you’ve created the database and user, let me know and I’ll help you import the bilal.sql file and update your connection settings.

You’re almost there! Since you’ve already created the user and databases, you can link them together here: Go to the MySQL Databases section in cPanel (not the Wizard this time). Scroll down to the ADD USER TO DATABASE section. Select your user and one of the databases from the dropdowns, then click Add. On the next screen, tick ALL PRIVILEGES and click Make Changes. Repeat those steps to link that same user to all three databases. Once that’s done, we can head over to phpMyAdmin to import your SQL files!

Now that the databases are ready, we need to import your data. First, let’s download your SQL files from the server to your computer so you can upload them through phpMyAdmin: Go to File Manager and navigate to ims/fms/db. Right-click bilal.sql and select Download. Do the same for the SQL files in your other project folders (lms and srms). Once you’ve downloaded them, let me know and I’ll walk you through the import process in phpMyAdmin!

 

Excellent. Now let’s import the first one: Go back to cPanel and click phpMyAdmin. In the list on the left, click on najojoacademy_bilal. Click the Import tab at the top. Click Choose File and select the bilal.sql file from your computer. Scroll down and click Import (or Go). Let me know when you see the success message!

In File Manager, go to ims/fms and right-click dbcon.php to select Edit. Look for this line: mysqli_connect(‘localhost’,’root’,”,’bilal’) Update it with your new details: • Replace ‘root’ with ‘najojoacademy_najojoacademy’ • Replace the empty ” with the password you created • Replace ‘bilal’ with ‘najojoacademy_bilal’ Save the changes and your fms project should be live at najojoacademy.co.ls/ims/fms! Want to try that now?

For the other two projects, the process is exactly the same: • For lms: Import capstone.sql into najojoacademy_capstone, then update ims/lms/dbcon.php with your new database name, user, and password. • For srms: Import srms_makumbusho.sql into najojoacademy_srms_makumbusho, then update ims/srms/script/db/config.php

 

In that srms config.php file, you’ll see lines starting with DEFINE. Just replace ‘root’ and ‘srms_makumbusho’ with your new details, and put your password between the empty quotes for DBPass. Let me know if you hit any snags while updating those!