How I Recovered My Lost MySQL Databases After a MariaDB Installation (Without Timeshift Restore)

Losing databases unexpectedly can feel catastrophic — especially when it happens after installing something that’s supposed to help, not break things. That’s what happened when I installed MariaDB while setting up Daloradius on my Ubuntu system.

After installation, all my databases were gone, and phpMyAdmin started showing this dreaded message:

mysqli::real_connect(): (HY000/1698): Access denied for user 'phpmyadmin'@'localhost'

When I logged into the database, all my previous projects had vanished. But I eventually managed to recover everything manually — without using sudo timeshift --restore. Here’s how I did it step by step.

1. Understanding the Problem

When you install MariaDB on a system that already has MySQL, Ubuntu often treats MariaDB as a drop-in replacement for MySQL.

That means:

  • MySQL is automatically removed or replaced.

  • The folder /var/lib/mysql (which contains all databases) is overwritten with a fresh MariaDB data directory.

  • Your old database files are not deleted from disk immediately — but they’re moved, renamed, or left behind in a previous snapshot folder (if you use Timeshift or have manual backups).

As a result, logging into phpMyAdmin or MySQL shows no user-created databases.

2. Verifying That MariaDB Overwrote MySQL

To confirm that MySQL was replaced:

mysql --version

It returned something like

mysql Ver 15.1 Distrib 10.x.x-MariaDB, for Linux (x86_64)

That meant MySQL binaries were now replaced by MariaDB. Checking databases:

sudo mariadb -u root -p

SHOW DATABASES;

Only system databases like mysql, information_schema, and performance_schema appeared — everything else was gone.

3. Removing MariaDB Completely

To restore my system, I decided to remove MariaDB entirely.

sudo systemctl stop mariadb
sudo apt purge mariadb-server mariadb-client mariadb-common -y
sudo apt autoremove -y
sudo apt autoclean

Then, I verified that no MariaDB packages were still on the system:

dpkg -l | grep mariadb

If any showed up, I manually removed them too.

4. Reinstalling MySQL

Once MariaDB was gone, I reinstalled MySQL 8.0:

sudo apt update
sudo apt install mysql-server -y

There were a few configuration prompts and minor errors like:

update-alternatives: error: alternative path /etc/mysql/mysql.cnf doesn't exist

I simply chose the default options (pressing Enter where prompted). After installation, MySQL was back, but with a fresh data directory — and, of course, no old databases.

5. Manually Restoring the Old Databases

Here’s where the manual recovery came in.

Step 1: Locate the old MySQL folder

I opened my Timeshift snapshots manually (without running restore).
Timeshift stores snapshots under:

/timeshift/snapshots/

Inside the latest snapshot folder, I navigated to:

/timeshift/snapshots/<snapshot-date>/localhost/var/lib/

Here, I found my old MySQL folder that contained all my previous .frm, .ibd, .ibdata1, and .myd database files.

Step 2: Stop the MySQL service

Before replacing anything, I stopped MySQL:

sudo systemctl stop mysql

Step 3: Backup the new (empty) MySQL folder

Just to be safe:

sudo mv /var/lib/mysql /var/lib/mysql_backup_new

Step 4: Copy the old MySQL folder from the snapshot

Then I copied my old databases back:

sudo cp -r /timeshift/snapshots/<snapshot-date>/localhost/var/lib/mysql /var/lib/mysql

(Replace <snapshot-date> with the correct snapshot folder name.)

Step 5: Set proper ownership and permissions

sudo chown -R mysql:mysql /var/lib/mysql

sudo chmod -R 755 /var/lib/mysql

Step 6: Restart MySQL

sudo systemctl start mysql

If everything went fine, the MySQL service started normally.

6. Confirming the Recovery

Once MySQL was running again, I logged in:

sudo mysql -u root -p

Then checked all databases:

SHOW DATABASES;

To my relief, all my previous databases were back exactly as they were before the MariaDB installation.

phpMyAdmin also loaded perfectly again, without the “access denied” errors.

7. Backing Up Everything Immediately

The first thing I did after recovery was back up all databases to a single .sql file:

mysqldump -u root -p --all-databases > ~/backup_all_databases.sql

That way, even if something similar happens again, I can restore everything with one command:

mysql -u root -p < ~/backup_all_databases.sql

8. Key Takeaways

  • MariaDB and MySQL share the same paths — installing one can silently replace the other.
  • Your old data isn’t necessarily gone — it’s just no longer linked to the running service.
  • Manual restoration works if you can access old system files via Timeshift or a backup.
  • Always stop the MySQL service before overwriting /var/lib/mysql, and fix file permissions afterward.
  • Keep regular SQL dumps to make recovery faster next time.

This experience was a reminder that even routine installations can wipe out critical data if we’re not careful.
By manually restoring the /var/lib/mysql directory from a snapshot and resetting file permissions, I managed to recover every single database without using full system restore tools.

So, if you ever find yourself staring at an empty phpMyAdmin after a MariaDB install — don’t panic.
Your data is probably still there. You just need to bring it home.



CONTINUE READING

How to Choose the Right Software Development Partner

How to Choose the Right Software Development Partner

Choosing a software development partner is like picking a co-pilot for a long journey. The right one ensures a smooth ride; the wrong one can leave you stranded.

Many businesses—especially startups and SMEs—struggle with this decision. Should you hire locally or outsource? How do you know if a developer is truly skilled or just good at selling themselves? And what about hidden costs, missed deadlines, or security risks?

In this guide, we’ll break down:
 Key factors to evaluate (beyond just cost)
🚩 Red flags that signal trouble
💡 Real-world tips from industry experts

By the end, you’ll know exactly what to look for—and how to avoid costly mistakes.

 

Step 1: Define Your Needs Clearly

Before searching for a partner, ask:

  • What problem are you solving? (A new app, legacy system upgrade, AI integration?)
  • What’s your budget and timeline? (Fixed cost? Agile development?)
  • Do you need ongoing support? (Or just a one-time build?)

Example:
A fintech startup needing a secure mobile payment app will prioritize:
 Regulatory compliance (PCI-DSS, GDPR)
 Experienced fintech developers
 Post-launch maintenance

A small business wanting a basic website may focus more on:
 Affordable, fast delivery
 User-friendly CMS (like WordPress)

Pro Tip: Write a short project brief (even 1 page helps) to share with potential partners.

 

Step 2: Look for Technical Expertise

A. Relevant Experience

  • Have they built similar projects before? Ask for case studies or demos.
  • Do they understand your industry’s challenges? (E.g., healthcare needs HIPAA compliance.)

Warning Sign:
 "We can build anything!" (Without proof.)

B. Tech Stack Knowledge

  • Do they use modern, scalable technologies? (Avoid partners stuck in outdated systems.)
  • Can they explain why they chose a certain tech? (Not just following trends.)

Example:

  • Web apps: React.js (frontend) + Node.js (backend)
  • Mobile apps: Flutter (cross-platform) or Swift/Kotlin (native)
  • AI/ML: Python, TensorFlow

Pro Tip: Ask: "How would you architect this project?" Their answer reveals depth of knowledge.

 

Step 3: Evaluate Communication & Transparency

Poor communication causes 60% of project failures (PMI). Look for:

 Clear processes (Daily standups? Weekly reports?)
 Timezone overlap (At least 4 hours for real-time collaboration.)
 Single point of contact (Avoid getting passed between 5 people.)

Red Flags:
Slow email responses (24+ hours regularly)
Vague answers to technical questions

Pro Tip: Do a trial task (paid) to test responsiveness before committing.

 

Step 4: Check Security & Compliance

A single data breach costs $4.45 million on average (IBM). Ensure your partner:

Follows secure coding practices (OWASP standards)
Signs an NDA & data protection agreement
Has disaster recovery plans (Ask: "How do you handle breaches?")

Critical for:

  • Healthcare (HIPAA)
  • Finance (PCI-DSS, SOC 2)
  • EU clients (GDPR)

 

Step 5: Compare Pricing Models

Model

Best For

Risk

Fixed Price

Small, well-defined projects

Low flexibility

Time & Materials

Complex, evolving projects

Budget uncertainty

Dedicated Team

Long-term projects

Higher cost

Ask:

  • "What’s included in the cost?" (Hidden fees for support?)
  • "How do you handle scope changes?"

 

Step 6: Verify Reputation

 Clutch.co/G2 reviews (Look for detailed feedback.)
 Ask for client references (Talk to past clients directly.)
 GitHub/Portfolio (Check code quality if possible.)

Red Flag:
No portfolio or only "testimonials" from unverifiable sources.

 

Final Checklist Before Signing

🔲 Defined project scope & milestones
🔲 Clear contract (IP ownership, support terms)
🔲 Security protocols in place
🔲 Trial period or pilot project

 

Need a Reliable Partner? Try Africancscript

We’ve helped 150+ businesses build secure, scalable software with:
 Vetted developers in Africa (Cost-efficient, high-quality)
 End-to-end project ownership (From idea to launch)
 Transparent Agile processes (No surprise delays)

[Book a Free Consultation] → Let’s discuss your project!

 

CONTINUE READING

How to Reduce IT Downtime with Proactive Monitoring

Why IT Downtime Hurts (And How Proactive Monitoring Fixes It)

Imagine this: Your company’s website crashes during a major sales event. Customers can’t check out, support tickets pile up, and your team scrambles to find the issue. By the time it’s fixed, you’ve lost revenue, trust, and sleep.

This is what unplanned IT downtime looks like—and it’s more common than you think. Studies show that:

  • The average business faces 14 hours of downtime per year.
  • 98% of organizations say just one hour of downtime costs over $100,000.

The good news? Most outages are preventable. Instead of waiting for systems to fail, proactive monitoring spots warning signs early—like a doctor catching an illness before it becomes critical.

What is Proactive Monitoring?

Proactive monitoring means constantly watching your IT systems (servers, networks, applications) for early signs of trouble—before users even notice a problem.

How It Differs from Reactive Monitoring

  • Reactive monitoring: You find out about issues after they happen (e.g., a server crashes, and your team gets alerts).
  • Proactive monitoring: You detect slow performance, unusual traffic spikes, or memory leaks before they cause a full outage.

Key Strategies for Proactive Monitoring


1. Monitor the Right Things (Not Just Uptime)

Many companies only track "Is it up or down?"—but that’s not enough. You should also monitor:

  • Performance metrics (CPU, memory, disk usage)
  • Network latency (slow connections = early warning)
  • Application errors (even small glitches can snowball)
  • Security threats (unusual login attempts, malware scans)

Example: If your database server’s CPU usage hits 90% for an hour, proactive monitoring flags it before it crashes.

2. Set Up Smart Alerts (Avoid Alert Fatigue)

Too many alerts = ignored alerts. Instead:

  • Prioritize critical alerts (e.g., "Server down" vs. "Disk 75% full").
  • Use thresholds (Alert only if CPU stays above 85% for 10+ minutes).
  • Escalate automatically (If no one responds in 15 minutes, notify the manager).

Bad Alert: "Disk space at 80%." (Might not be urgent.)
Good Alert: "Disk space at 95%—predicted to fill in 2 hours."

3. Predict Problems with AI & Automation

Modern tools use AI-driven analytics to:

  • Predict failures (e.g., "This server tends to crash when memory leaks reach X level").
  • Auto-fix known issues (Restart a stuck service before users complain).
  • Learn from past incidents ("Last time CPU spiked like this, it led to a crash").

Example: Cloud providers like AWS use AI to auto-scale servers before traffic overloads them.

4. Test Failures Before They Happen (Chaos Engineering)

Companies like Netflix intentionally break their systems to see if monitoring catches it. You can too:

  • Simulate a server crash (Does monitoring detect it instantly?).
  • Flood your network (Can your tools spot abnormal traffic?).
  • Test backup restores (Many backups fail when you actually need them).

Pro Tip: Start small—like randomly killing a non-critical service—and see how your team responds.

Best Tools for Proactive Monitoring

Tool Best forWhy it's great
PrometheusMetrics & alerting (open-source)Flexible, integrates with Grafana
DatadogFull-stack monitoring (cloud apps)AI-powered anomaly detection
New RelicApplication performance (APM)Tracks slow code in real time
ZabbixNetwork & server monitoringFree, works on-premises
PagerDutyAlert management & on-call scheduling

Stops alerts from being missed

 

Real-World Example: How Proactive Monitoring Saved a Retailer

A mid-sized e-commerce site kept crashing during flash sales. Their old monitoring only alerted them after the site went down.

After switching to proactive monitoring, they:
✔ Spotted traffic spikes 30 mins before crashes (and scaled servers in time).
✔ Fixed a memory leak in their checkout system (before customers noticed).
✔ Reduced downtime by 80% in 3 months.

Final Tips to Get Started

  1. Start small—Pick one critical system (like your main database) and monitor it deeply.
  2. Train your team—Make sure they understand alerts (not just "ignore until it breaks").
  3. Review incidents weekly—Ask, "Could we have caught this earlier?"
  4. Automate fixes—Even simple scripts (like restarting a service) can prevent big outages.

Bottom Line

Proactive monitoring isn’t just about avoiding downtime—it’s about sleeping better at night knowing your systems are being watched 24/7. The best time to set it up? Before your next outage happens.

Need help implementing proactive monitoring? [Contact our IT experts: info@africanscript.com] for a free consultation.

CONTINUE READING

Setting Up cPanel for First-Time Use - Hosting HTML Apps/Websites

Setting Up cPanel for First-Time Use - Hosting HTML Apps/Websites

Hosting a static HTML website or app is one of the simplest ways to get your content online. However, to ensure optimal performance, security, and scalability, you need to leverage cPanel’s advanced features. This guide will walk you through the entire process, from uploading files to implementing advanced optimizations.

 

Step 1: Accessing cPanel – A Detailed Guide

Accessing cPanel is the first step in hosting your HTML website. Here’s everything you need to know:

1.1 Understanding cPanel Access

cPanel is a web-based control panel provided by most hosting providers to manage your hosting account. It allows you to perform tasks like creating email accounts, managing databases, and uploading files.

To access cPanel, you typically need:

  • A domain name (e.g., yourdomain.com).
  • cPanel login credentials (username and password) provided by your hosting provider.

1.2 How to Access cPanel

There are several ways to access cPanel, depending on your hosting setup:

Method 1: Direct cPanel URL

Most hosting providers offer a direct URL to access cPanel. This is usually in one of the following formats:

  • yourdomain.com/cpanel
  • yourdomain.com:2083 (for HTTPS access)
  • cpanel.yourdomain.com

Steps:

  1. Open your web browser and enter the cPanel URL provided by your hosting provider.
  2. Enter your cPanel username and password.
  3. Click Log in.

Pro Tip: If you’re unsure of the cPanel URL, check the welcome email from your hosting provider or contact their support team.

Method 2: Access via Hosting Account Dashboard

Many hosting providers (e.g., Bluehost, SiteGround, HostGator) include cPanel access through their account dashboard.

Steps:

  1. Log in to your hosting account dashboard.
  2. Look for a button or link labeled cPanelControl Panel, or Manage Hosting.
  3. Click the link to be redirected to cPanel.
Method 3: Using IP Address

If your domain’s DNS hasn’t propagated yet, you can access cPanel using your server’s IP address.

Steps:

  1. Find your server’s IP address in the welcome email from your hosting provider.
  2. Enter the IP address followed by :2083 in your browser (e.g., 192.168.1.1:2083).
  3. Enter your cPanel credentials to log in.

1.3 Troubleshooting cPanel Access Issues

If you’re unable to access cPanel, here are some common issues and solutions:

Issue 1: Incorrect Login Credentials
  • Double-check your username and password. These are case-sensitive.
  • If you’ve forgotten your password, use the Reset Password option or contact your hosting provider.
Issue 2: DNS Propagation Delays
  • If your domain is new or recently transferred, DNS changes may take up to 48 hours to propagate. Use the server IP address method (see Method 3 above) to access cPanel in the meantime.
Issue 3: Browser Cache or Cookies
  • Clear your browser cache and cookies, or try accessing cPanel in incognito mode.
  • Alternatively, use a different browser or device.
Issue 4: Firewall or IP Blocking
  • If you’re unable to access cPanel, your IP address may be blocked by the server’s firewall. Contact your hosting provider to resolve this.

1.4 Security Best Practices for cPanel Access

cPanel is the gateway to your hosting account, so securing it is critical. Here are some best practices:

1. Use Strong Credentials
  • Create a strong, unique password for cPanel. Avoid using common words or easily guessable patterns.
  • Use a password manager to generate and store your credentials securely.
2. Enable Two-Factor Authentication (2FA)
  • Many hosting providers offer 2FA for cPanel. Enable it to add an extra layer of security.
  • Use an authenticator app like Google Authenticator or Authy for 2FA.
3. Restrict Access by IP
  • Use cPanel’s IP Deny Manager to restrict access to specific IP addresses. This ensures only trusted devices can access cPanel.
4. Monitor Login Activity
  • Regularly check cPanel’s Last Login feature to monitor access attempts.
  • If you notice suspicious activity, change your password immediately.

1.5 Advanced Access Methods

For advanced users, there are additional ways to access cPanel functionality:

1. SSH Access
  • If you have SSH access to your server, you can use command-line tools like whmcli or cPanel API to manage your hosting account.
2. cPanel API
  • Developers can use cPanel’s API to automate tasks like creating email accounts, managing databases, or installing software.
3. Third-Party Tools
  • Tools like ManageWP or MainWP allow you to manage multiple WordPress sites and cPanel accounts from a single dashboard.

1.6 What to Do After Accessing cPanel

Once you’ve successfully logged in to cPanel, take the following steps:

  • Familiarize yourself with the interface. cPanel is divided into sections like FilesDatabasesDomains, and Software.
  • Update your contact email address in User Manager to ensure you receive important notifications.
  • Explore the Preferences section to customize your cPanel experience.

 

Step 2: Uploading HTML Files

Uploading your HTML files is the next step in hosting your website. Here’s how to do it:

2.1 Access File Manager

In cPanel, navigate to the Files section and click File Manager.

2.2 Navigate to public_html

Open the public_html folder. This is the root directory where your website files should be stored.

2.3 Upload Files

  1. Click Upload to add your HTML, CSS, JavaScript, and other files.
  2. Alternatively, use an FTP client like FileZilla for larger file transfers.

2.4 Set Default Homepage

Ensure your main HTML file is named index.html. This file will serve as the default homepage.

Step 3: Configuring DNS Settings

Configuring DNS settings is crucial for ensuring your domain points to the correct server.

3.1 Access DNS Zone Editor

In cPanel, go to the Domains section and click Zone Editor.

3.2 Add DNS Records

  1. Create an A Record to point your domain to the server’s IP address.
  2. Add CNAME Records for subdomains (e.g., www).

 

Step 4: Securing Your HTML Website

Securing your website is essential to protect it from threats.

4.1 Install an SSL Certificate

  1. Go to the SSL/TLS section in cPanel.
  2. Install a free SSL certificate (e.g., Let’s Encrypt) to enable HTTPS.

4.2 Password-Protect Directories

  1. Use the Directory Privacy feature to restrict access to sensitive folders.

4.3 Set Up Backups

  1. Use cPanel’s Backup tool to create regular backups of your website files.

 

Step 5: Advanced Optimizations

Optimizing your website ensures it performs well and provides a good user experience.

5.1 Enable Gzip Compression

  1. Use cPanel’s Optimize Website tool to enable Gzip compression for faster loading times.

5.2 Minify CSS and JavaScript

  1. Use tools like CSSNano or UglifyJS to reduce file sizes.

5.3 Leverage Browser Caching

  1. Add caching headers to your .htaccess file to improve performance.

 

Step 6: Monitoring and Maintenance

Monitoring and maintaining your website ensures it remains secure and performs well.

6.1 Use cPanel’s Metrics Tools

  1. Monitor traffic using Awstats or Webalizer.
  2. Check for errors using Error Logs.

6.2 Set Up Cron Jobs

  1. Use cPanel’s Cron Jobs feature to automate tasks like backups or file cleanup.\


Conclusion

Hosting an HTML website with cPanel is simple, but leveraging its advanced features can significantly enhance your site’s performance and security. By following this guide, you’ll have a professional, high-performance HTML website ready to scale. 

CONTINUE READING

Setting Up cPanel for First-Time Use - WordPress

Setting Up cPanel for First-Time Use - WordPress: A Comprehensive Guide

cPanel is the industry-standard control panel for managing web hosting, and when paired with WordPress, it becomes a powerhouse for building and managing websites. Whether you're a beginner or an experienced developer, this guide will walk you through the entire process of setting up WordPress via cPanel, including advanced configurations and best practices.


Step 1: Accessing cPanel – A Detailed Guide

Accessing cPanel is the first step in setting up your WordPress website. Here’s everything you need to know:

1.1 Understanding cPanel Access

cPanel is a web-based control panel provided by most hosting providers to manage your hosting account. It allows you to perform tasks like creating email accounts, managing databases, installing software (like WordPress), and configuring security settings.

To access cPanel, you typically need:

  • A domain name (e.g., yourdomain.com).
  • cPanel login credentials (username and password) provided by your hosting provider.

1.2 How to Access cPanel

There are several ways to access cPanel, depending on your hosting setup:

Method 1: Direct cPanel URL

Most hosting providers offer a direct URL to access cPanel. This is usually in one of the following formats:

  • yourdomain.com/cpanel
  • yourdomain.com:2083 (for HTTPS access)
  • cpanel.yourdomain.com

Steps:

  1. Open your web browser and enter the cPanel URL provided by your hosting provider.
  2. Enter your cPanel username and password.
  3. Click Log in.

Pro Tip: If you’re unsure of the cPanel URL, check the welcome email from your hosting provider or contact their support team.

Method 2: Access via Hosting Account Dashboard

Many hosting providers (e.g., Bluehost, SiteGround, HostGator) include cPanel access through their account dashboard.

Steps:

  1. Log in to your hosting account dashboard.
  2. Look for a button or link labeled cPanelControl Panel, or Manage Hosting.
  3. Click the link to be redirected to cPanel.
Method 3: Using IP Address

If your domain’s DNS hasn’t propagated yet, you can access cPanel using your server’s IP address.

Steps:

  1. Find your server’s IP address in the welcome email from your hosting provider.
  2. Enter the IP address followed by :2083 in your browser (e.g., 192.168.1.1:2083).
  3. Enter your cPanel credentials to log in.

1.3 Troubleshooting cPanel Access Issues

If you’re unable to access cPanel, here are some common issues and solutions:

Issue 1: Incorrect Login Credentials
  • Double-check your username and password. These are case-sensitive.
  • If you’ve forgotten your password, use the Reset Password option or contact your hosting provider.
Issue 2: DNS Propagation Delays
  • If your domain is new or recently transferred, DNS changes may take up to 48 hours to propagate. Use the server IP address method (see Method 3 above) to access cPanel in the meantime.
Issue 3: Browser Cache or Cookies
  • Clear your browser cache and cookies, or try accessing cPanel in incognito mode.
  • Alternatively, use a different browser or device.
Issue 4: Firewall or IP Blocking
  • If you’re unable to access cPanel, your IP address may be blocked by the server’s firewall. Contact your hosting provider to resolve this.

1.4 Security Best Practices for cPanel Access

cPanel is the gateway to your hosting account, so securing it is critical. Here are some best practices:

1. Use Strong Credentials
  • Create a strong, unique password for cPanel. Avoid using common words or easily guessable patterns.
  • Use a password manager to generate and store your credentials securely.
2. Enable Two-Factor Authentication (2FA)
  • Many hosting providers offer 2FA for cPanel. Enable it to add an extra layer of security.
  • Use an authenticator app like Google Authenticator or Authy for 2FA.
3. Restrict Access by IP
  • Use cPanel’s IP Deny Manager to restrict access to specific IP addresses. This ensures only trusted devices can access cPanel.
4. Monitor Login Activity
  • Regularly check cPanel’s Last Login feature to monitor access attempts.
  • If you notice suspicious activity, change your password immediately.

1.5 Advanced Access Methods

For advanced users, there are additional ways to access cPanel functionality:

1. SSH Access

  • If you have SSH access to your server, you can use command-line tools like whmcli or cPanel API to manage your hosting account.

2. cPanel API

  • Developers can use cPanel’s API to automate tasks like creating email accounts, managing databases, or installing software.

3. Third-Party Tools

  • Tools like ManageWP or MainWP allow you to manage multiple WordPress sites and cPanel accounts from a single dashboard.

1.6 What to Do After Accessing cPanel

Once you’ve successfully logged in to cPanel, take the following steps:

  • Familiarize yourself with the interface. cPanel is divided into sections like FilesDatabasesDomains, and Software.
  • Update your contact email address in User Manager to ensure you receive important notifications.
  • Explore the Preferences section to customize your cPanel experience.

 

Step 2: Installing WordPress Using Softaculous

Softaculous is a one-click installer that simplifies the process of installing WordPress. Here’s how to use it like a pro:

2.1 Locate Softaculous

In cPanel, scroll to the Software section and click Softaculous Apps Installer.

2.2 Select WordPress

On the Softaculous dashboard, search for WordPress and click Install.

2.3 Configure Installation Settings

  1. Choose Protocol: Select https:// if you have an SSL certificate (highly recommended for security and SEO).
  2. Choose Domain: Select the domain where you want to install WordPress.
  3. In Directory: Leave this blank to install WordPress on the root domain (e.g., yourdomain.com). Use a subdirectory (e.g., /blog) if you want to install WordPress in a specific folder.

2.4 Set Up Admin Account

  1. Use a strong username (avoid "admin") and a complex password.
  2. Add a valid email address for admin notifications and password recovery.

2.5 Advanced Options

  1. Enable Auto-Upgrade to keep WordPress core, themes, and plugins updated automatically.
  2. Disable User Notifications if you don’t want users to receive update emails.

2.6 Click Install

Softaculous will handle the installation, and you’ll receive a confirmation once it’s complete.

 

Step 3: Accessing the WordPress Dashboard

Once installed, log in to your WordPress dashboard by visiting yourdomain.com/wp-admin. Use the admin credentials you created during installation. From here, you can:

  • Customize your site with themes and plugins.
  • Create pages, posts, and menus.
  • Manage users and permissions.

 

Step 4: Advanced Configurations

4.1 Database Management

  • Access MySQL Databases in cPanel to create and manage databases for WordPress.
  • Use phpMyAdmin to optimize tables, run queries, or export/import databases.

4.2 File Management

  • Use File Manager in cPanel to access WordPress files like wp-config.php, themes, and plugins.
  • Set correct file permissions (e.g., 644 for files, 755 for folders) to enhance security.

4.3 Email Setup

  • Create professional email addresses (e.g., info@yourdomain.com) using cPanel’s Email Accounts tool.
  • Configure email forwarding and autoresponders for better communication.

 

Step 5: Securing Your WordPress Site


  1. Install Security Plugins: Use plugins like Wordfence, iThemes Security, or Sucuri to protect against malware and brute-force attacks.
  2. Enable Two-Factor Authentication (2FA): Add an extra layer of security to your admin login.
  3. Set Up a Firewall: Use cPanel’s IP Blocker or a plugin like Wordfence to block malicious IPs.
  4. Regular Backups: Use cPanel’s Backup tool or a plugin like UpdraftPlus to schedule automated backups.

 

Step 6: Optimizing Performance

  1. Enable Caching: Use plugins like WP Rocket or W3 Total Cache to improve site speed.
  2. Optimize Images: Compress images using tools like Smush or ShortPixel.
  3. Minify CSS and JavaScript: Use plugins like Autoptimize to reduce file sizes.
  4. Enable Gzip Compression: Use cPanel’s Optimize Website tool to enable Gzip compression.

 

Conclusion

Setting up WordPress via cPanel is a straightforward process, but mastering advanced configurations and optimizations can take your site to the next level. By following this guide, you’ll have a secure, high-performance WordPress site ready to scale.

CONTINUE READING

Lamp Server Setup

How to Install and Set-up an Ubuntu Lamp Server
Setting up a LAMP stack is an important step in hosting websites and web applications. The LAMP stack (Linux, Apache, MySQL, and PHP) provides a stable foundation for developers to produce dynamic web content. This guide will walk you through the installation and configuration of a LAMP server on an Ubuntu system.

What is a LAMP Stack?
Web servers are powered by an open-source software package known as a LAMP stack. Below is a summary of every element: The primary operating system that controls server resources is Linux. • Apache: A popular web server program that provides content for websites. • MySQL: An application data storage and retrieval database management system. • PHP: A server-side scripting language that makes server-side logic and dynamic content possible. A strong and flexible environment for launching websites and web apps is produced by this combination.

Requirements
Before beginning the LAMP stack installation, make sure your environment is adequately prepared to avoid issues throughout the setup process. The requirements are described in further detail below:

  1. Ubuntu Server 
    Verify that your Ubuntu server is operational. This could be a cloud-based instance, virtual machine, or physical server. Ubuntu serves as the operating system on which all other components of your LAMP stack are built. Download the most recent version of Ubuntu from the official website if you're starting from scratch, or use a cloud provider like AWS, DigitalOcean, or Google Cloud to set up a server instance.

  2. A User Account with `sudo` Privileges

    Administrative privileges are frequently required while running installation and setup operations. Without logging in as the root user, you can safely run these commands as a non-root user with `sudo` capabilities. To create such a user, follow these steps: 

             - Log in as root: 

                       ssh root@your_server_ip

             - Create a new user: 

                       adduser username

             - Grant `sudo` privileges: 

                       usermod -aG sudo username

      Always use this user for enhanced security.

  3. Basic Understanding of Command-Line Operations
    It is necessary to be familiar with the fundamental Linux command-line functions. You can troubleshoot and setup your server more efficiently if you know how to manage processes, navigate directories, and edit files with a text editor like `nano` or `vim`. To get comfortable with Linux, try practicing popular commands like `ls`, `cd`, `cp`, `mv`, and `chmod`.

  4. Minimum System Requirements

    Make sure your server satisfies or surpasses these fundamental requirements for optimum performance:

            - RAM: At least 1GB. This is crucial for running Apache, MySQL, and PHP smoothly. Although it is technically possible to operate a LAMP stack with less RAM, performance may suffer, particularly when the system is under strain.

Now that your environment is prepared and all prerequisites are in place, let’s dive into the step-by-step process of installing and configuring the LAMP stack on your Ubuntu server.

Step 1: Update the Package Manager
Before installing any software, ensure your package manager has the latest information about available software versions. This ensures you install the most up-to-date and secure versions.

This command fetches the latest metadata for software repositories configured on your server:

  • sudo apt update

Update all installed software to their latest versions:

  • sudo apt upgrade -y

If the upgrade includes critical system updates, you may need to reboot:

  • sudo reboot

Step 2: Install Apache
Apache is a powerful, open-source web server used to host websites.
Use the following command to install the Apache2 package:

  • sudo apt install apache2 -y

Once installed, verify that Apache is running:

  • sudo systemctl status apache2

Make sure Apache automatically starts whenever the server is rebooted:

  •  sudo systemctl enable apache2

Testing Apache:

  • Open a web browser and navigate to your server’s public IP address (e.g., http://your_server_ip).
  • You should see the default Apache welcome page, which confirms the installation was successful.

Step 3: Install MySQL
MySQL is a powerful database management system for managing and storing data for apps and websites.
Use this command to install the MySQL server package:

  • sudo apt install mysql-server -y

To secure MY SQL, run the below security script:

  • sudo mysql_secure_installation
  • Set a strong root password.
  • Remove anonymous users and test databases
  • Disable remote root logins for added security.

Check the installation of MySQL. Open the MySQL console and log in:

  • sudo mysql

Once inside, make sure it's working by running this quick command:

  • SHOW DATABASES;

Type exit to close the console.

Step 4: Install PHP
PHP is a programming language used to create dynamic online content.
To install PHP and the necessary modules for Apache and MySQL integration, use the following command:

  • sudo apt install php libapache2-mod-php php-mysql -y

Verify the PHP version that is installed:

  • php -v

Based on your application needs, you might require additional PHP modules. For example:

  • sudo apt install php-curl php-cli php-gd php-zip php-xml php-mbstring -y


Step 5: Configure Apache to Prioritize PHP Files
Apache must be aware that PHP files should be prioritized over other file formats, such as HTML.

Modify the configuration file:
The Apache dir.conf file should open.

  • sudo nano /etc/apache2/mods-enabled/dir.conf

Modify the file's priority making sure index.php comes before index.html:

  •     DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.html

Restart Apache:
Restarting the Apache service will apply the modifications:

  • sudo systemctl restart apache2


Step 6: Test PHP Integration
Testing guarantees that PHP and Apache are properly integrated.
Create a PHP test file info.php in the default web root directory:

  • sudo nano /var/www/html/info.php

Include the PHP code below:

  • phpinfo();
  • ?>

Use a browser to access the test file:
Open a web browser and visit http://your_server_ip/info.php. You should see the PHP information page, which confirms PHP is working.

Once verified, delete the test file for security reasons:

  • sudo rm /var/www/html/info.php


Step 7: Configure the Firewall 
Make sure your firewall permits online traffic for security.
Allow Apache traffic:
Enable Apache's full profile on the firewall using the command below:

  • sudo ufw allow in "Apache Full"

Verify the firewall's status by checking the modifications:

  • sudo ufw status


Conclusion
In this guide, you’ve successfully installed and configured a LAMP server on Ubuntu. This setup lays the foundation for hosting websites and applications. From here, you can:

  • Install a CMS such as WordPress.
  • Use SSL certificates to secure your server.
  • Performance should be optimized for applications with a lot of traffic.

CONTINUE READING