When it comes to installing WordPress, many people rely on cPanel to make the process smoother. However, there are scenarios where cPanel isn’t available, especially if you’re on a VPS (Virtual Private Server) or a server without any graphical interface for web management.
Does that mean you’re stuck? Absolutely not! In this detailed guide, we will walk you through the step-by-step process of how to install WordPress without cPanel. We’ll cover different approaches using the command line, FTP (File Transfer Protocol), and database management tools to get you up and running.
Why Install WordPress Without cPanel?
Before we dive into the installation process, it’s important to understand why you might need to install WordPress without cPanel. Here are a few reasons:
- No cPanel Access: Many hosting services, particularly unmanaged VPS providers, do not come with cPanel. You may also encounter some cloud services like AWS or Google Cloud that don’t provide cPanel out of the box.
- Cost Efficiency: cPanel usually adds extra cost to your hosting plan, especially on VPS or dedicated hosting. By skipping cPanel, you can save money.
- Learning Opportunity: If you’re a web developer or system admin, understanding how to manage WordPress installation manually will give you more control over your server and site.
- Performance and Resource Control: By bypassing cPanel, you can fine-tune server configurations more directly and free up resources otherwise used by cPanel’s services.
Now that we know why you might want to install WordPress without cPanel, let’s get into how to do it.
Requirements for Installing WordPress Without cPanel
Before we begin the installation process, there are a few things you will need:
Access to your server: Since there’s no cPanel, you’ll need access to your server via SSH or FTP.
A domain name: Make sure you have a domain name pointed to your server.
A LAMP or LEMP stack: This includes:
- Linux operating system (any Linux distribution like Ubuntu, CentOS, or Debian will work).
- Apache or Nginx as the web server.
- MySQL or MariaDB as the database.
- PHP for running WordPress scripts.
If you don’t have these installed on your server yet, you’ll need to set them up first.
Choosing the Right Hosting Provider
When you don’t have cPanel, the choice of hosting provider becomes more critical. Not all hosting providers are created equal, especially when it comes to installing WordPress without cPanel. So, your choice will depend on your site’s size, traffic, and future growth potential. Here’s a quick comparison between shared and VPS hosting for you so you can figure out which one you should go for:
- Shared Hosting: Best for smaller sites or blogs. It’s affordable but shares resources with other sites, which can affect performance.
- VPS (Virtual Private Server): Offers more control and better performance, ideal for growing websites or online stores.
Install WordPress Without cPanel – Step-by-Step Guide
Now that you choosen the suitable hosting type for your website, let’s have a look at the step-by-step process of installing wordpress without cPanel:
Step 1: Connecting to Your Server via SSH or FTP
Without cPanel, you’ll rely heavily on Secure Shell (SSH) or File Transfer Protocol (FTP) to communicate with your server. Here’s how to connect:
Connecting via SSH
If you have root access to your server, you can connect via SSH using a terminal (for Linux or Mac) or an SSH client like PuTTY (for Windows).
Enter your password when prompted.
Connecting via FTP
If you’re using FTP, you’ll need an FTP client like FileZilla to upload WordPress files to your server. Connect to your server by entering the server’s IP address, username, and password in FileZilla’s interface.
Step 2: Downloading and Uploading WordPress Files
Once you’re connected to your server, you’ll need to download the latest version of WordPress from the official website and upload it to your server.
Option 1: Download WordPress via SSH
To do this, navigate to the directory where you want to install WordPress (usually /var/www/html or /var/www/your-domain-name):
Now, download WordPress:
Next, extract the files:
This will create a wordpress directory with all the necessary files. You can move these files to your website’s root directory by running:
Finally, remove the leftover tar file:
Option 2: Upload WordPress via FTP
If you’re using FTP, after downloading WordPress to your local machine, unzip the file. Use your FTP client to upload the unzipped files to the directory where you want to install WordPress.
Step 3: Setting Up a MySQL Database
WordPress needs a database to store all of your website’s data (posts, users, settings, etc.). Without cPanel’s “MySQL Database Wizard,” you’ll create the database manually.
Step 3.1: Create the Database
Log in to MySQL or MariaDB:
After entering your MySQL root password, create a new database:
Step 3.2: Create a Database User
Now, create a new MySQL user and assign it to the WordPress database. Replace ‘yourusername’ and ‘yourpassword’ with your desired credentials:
Step 3.3: Grant Permissions
Grant the new user full privileges to the WordPress database:
Flush privileges to save the changes:
Finally, exit the MySQL prompt:
Step 4: Configuring WordPress
Step 4.1: Renaming the wp-config-sample.php File
Now that WordPress is uploaded, and the database is set up, you need to configure WordPress to communicate with the database.
Rename the wp-config-sample.php file to wp-config.php:
Step 4.2: Edit the wp-config.php File
Next, open the file to edit:
You’ll need to update the following fields with the database information you created earlier:
Save and close the file (for nano, this is CTRL + O to save and CTRL + X to exit).
Step 4.3: Set File Permissions
To ensure WordPress works properly, adjust the file permissions:
Step 5: Installing WordPress
Once the configuration is done, it’s time to actually install WordPress.
Step 5.1: Running the WordPress Installation Script
Open your browser and navigate to your domain (or your server’s IP address) to begin the installation process:
If everything was set up correctly, WordPress will present you with its famous installation screen. You’ll need to provide some basic information, such as:
- Site Title
- Admin Username
- Admin Password
- Your Email Address
Step 5.2: Completing the Installation
After filling in the information, click “Install WordPress,” and you’ll be taken to the login page. Congratulations, you’ve just installed WordPress without cPanel!
Step 6: Post-Installation Tasks
After the installation is complete, there are a few important tasks you should complete to ensure your WordPress site runs smoothly.
Step 6.1: Secure Your WordPress Site
Security is paramount, especially when you’re managing your own server without cPanel. Here are a few immediate steps to take:
- Install a Security Plugin: Plugins like Wordfence or Sucuri can help secure your WordPress site.
- Change File Permissions: Ensure file permissions are set properly. Your wp-config.php should be set to chmod 600 to prevent unauthorized access.
- Disable XML-RPC: XML-RPC can be a security vulnerability. Disabling it can prevent brute-force attacks.
Step 6.2: Install Essential Plugins
Some key plugins to consider:
- Yoast SEO or Rank Math for optimizing your site for search engines.
- WP Super Cache or W3 Total Cache to enhance your site’s performance.
- UpdraftPlus for automated backups.
Step 6.3: Optimize for Speed
Use tools like GTmetrix or Google PageSpeed Insights to measure your site’s performance. Simple optimizations, like enabling browser caching or optimizing images, can drastically improve load times.
Common Issues and Troubleshooting
While installing WordPress manually without cPanel is straightforward, a few common issues may arise during the process. Knowing how to troubleshoot these can save you time and headaches.
Database Connection Errors
A “database connection error” is one of the most common issues encountered during WordPress installation. This error typically occurs when WordPress cannot connect to the MySQL database you created.
If you see an error message that says, “Error establishing a database connection”, double-check your wp-config.php file for typos or wrong credentials.
File Permissions Issues
Another common issue occurs when WordPress can’t write to certain files or directories, which is usually due to improper file permissions. This can prevent WordPress from uploading images, updating plugins, or even running correctly. Fix this by adjusting file permissions in your FTP client (usually by right-clicking on the file and selecting “File Permissions”).
Securing Your WordPress Installation
Once WordPress is up and running, security should be your top priority. A secure site ensures that hackers or malware don’t compromise your data or disrupt your services. Here are some steps to lock things down:
- Change Default Admin Username: Never use “admin” as your username—it’s the first thing hackers will guess. Choose something unique.
- Enable Two-Factor Authentication: Install a plugin like Wordfence or iThemes Security to add two-factor authentication to your login process.
- Install an SSL Certificate: If your hosting provider doesn’t automatically provide one, make sure to install an SSL certificate for a secure HTTPS connection. Services like Let’s Encrypt offer free SSL certificates.
Final Thoughts
Installing WordPress without cPanel might initially seem like a challenge, but it’s actually a rewarding process that provides greater control over your website.
By following these steps, you’ll not only gain a deeper understanding of server management but also unlock the ability to tailor your hosting environment for optimal performance.
This method empowers you to reduce hosting costs, avoid the limitations of graphical interfaces, and enhance your technical skill set. Plus, by taking charge of the setup process, you’ll be in a better position to troubleshoot and customize your website to fit your exact needs.
So, whether you’re a web developer seeking more freedom or just someone looking to cut costs, installing WordPress manually can be a great alternative to relying on cPanel.
Once you complete the installation, you’ll be able to enjoy the satisfaction of having built your site from the ground up, with the knowledge to maintain and improve it over time.