First of all, I would like to thank you for choosing Cloudways for your business, freelance or blog. But why? Because in today’s world no one has time, every piece of time is important to all of us. Cloud hosting is the platform where you don’t have to take a headache or know too much knowledge about running a server. It’s an application based hosting where servers are provided by many web hosting providers and Cloudways manage to optimize it to run smoothly. Cloudways solve every problem by live chat within a few minutes. Cloudways removes all these hassles from server management and takes care of all the technical aspects and server-side issues for its users. By the way today I am not going to tell more about its review if you want a Cloudways review please read it here. (Article coming soon.)
Installation of WordPress on a Subfolder on Cloudways
Though there are many ways like install via ssh command or wp-config.php edit methods, Today in this blog post, I am here I am going to show you the easiest method and explain step by step how to install WordPress application on sub-directory(folder) on Cloudways hosting. Note that this tutorial is for those who already know how to install a WordPress application on Cloudways.com but don’t know how to install it on a subfolder like http://example.com/blog where the /blog is a different directory having separate WordPress application.
There are two easy methods you can Install a WordPress application on the Cloudways server. They are-
- Backend Method or FTP Access
- Frontend Method or Direct Installation
Method 1: Using SFTP /FTP (Backend Method)
We will install the WordPress application using the backend method and use apps like FileZilla. So, before proceeding, kindly install the FileZilla app or any client-side FTP access.
Step 1: Access Remote FTP Server via FileZilla
Access to your Server root domain Application by your credentials.
Step 2: Creating the folder name
Now heads to the public_html folder name and right-click on create the directory. Say name it /blog. Now We will install a fresh WordPress Application on this folder/directory.
Step 3: Install a Normal WordPress Application on your server
I assumed that you already know how to install a WordPress application on Cloudways. If you forgot kindly read the article How to Install a fresh WordPress application on Cloud Hosting. Now we need to move the files on the application we have just created to the newly created /blog folder so that it can be accessed via example.com/blog.
Step 4: Move the Files to the Newly Created Folder/Sub-Directory
Now access the newly created application via FTP login credentials and enter the public_html folder.
Now you can select CTRL+A to select all the files on the application and right-click on that to see the download option.
Kindly note that anything you download from FTP Server or upload on Remote Server can be seen on the left side of your desktop. I suggest you create a folder on your local server, i.e. Laptop/Desktop so that you later don’t get confused with the downloaded files on the PC.
Note: Downloading files from FTP Remote Server requires too much time due to the file processing is done one by one on the remote server. If you want to download the files at once within a few seconds creating an archive of the files on FTP, then read here to How to Archive Files on FileZilla or FTP Server.
Step 5: Upload the Files on the Sub-Directory/Folder
Now disconnect the recently created applications and access the root domain application. Goto the public_html folder & the name of the folder you have created. I have created as /blog here.
Upload all the files just you have downloaded on the example.com/blog folder. Again uploading multiple files at once on the Remote Server takes time. So We have written another article How to Upload files at once and extract them. (Remember that FTP Server don’t allow you to unzip a zip file directly on FileZilla. That can be done via SSH command. )
After the file uploads, let’s forward to the next step.
Step 6: Change Application Site URL & Home Address (Domain Management)
Go to the newly created application dashboard and launch the database manager. You can see the below options-
From the above lists click on wp-options. After that click on Select-Data. Now you will see the below options –
Now click on edit under the wp-options both for site URL and home. Enter your main root domain and folder name. For example http://example.com/blog and save it. Repeat the procedure for the home wp-options column also. But do not change the website URL in the domain management from the application dashboard for the subfolder installation.
Step 6 ends here after editing the site URL & home address.
Now load your website address and followed by the folder name, your sub-directory installation is complete. You can log in access details in the application dashboard which has been created recently. See how it looks like.
Method 2: Frontend Method or Direct Installation
This is the easiest method to Install a WordPress application on Cloudways or even on any web server. Personally, I use this method to install WordPress blogs for my other sites.
Step 1: Create an application
Again create an application from your Cloudways dashboard. For this method, you can either Install a WordPress version app or select a Custom App or create a PHP application database. Here, I have selected a PHP application.
Note: In this case, you can always use the database of the root domain. For security reasons, we suggest you use a separate application and not install the subfolder WordPress alongside the main database. If there is no application was created for the root or primary domain, then creating an application is compulsory.
Using different table_prefix on a single database you can install an unlimited number of WordPress if you want.
Step 2: Create a folder or subfolder
Here, for example, I am going to install a WordPress on my folder weneedwebsite.com/review/
To create a folder you can either use again the FTP access method or use a plugin called File Manager. You need to install this plugin on the main website under which website you want to install a separate WordPress installation. Say, your website is example.com and going to install the WordPress app on a subdirectory called /blog, install it on example.com. If example.com isn’t built with WordPress, then use the FTP Access method instead.
Using this plugin, you can create any file, folder, delete, and modify any files. The file manager handles everything like creating zip files, extracting files, downloading files, etc. This is a great plugin to manage everything from the front-end side of your website.
I have created the folder name kw-finder under the root domain weneedwebsite.com
Step 3: Download the WordPress Software
Step 4: Installation Process
Now access the complete URL i.e. example.com/blog on your browser. This should look like below-
Now, continue to complete the installation process. After clicking on Continue, you should see the below scene on the next window.
You will need to know the following items before proceeding.
- Database name
- Database username
- Database password
- Database host
- Table prefix (if you want to run more than one WordPress in a single database)
Now click on Let’s go! Then you can see the following screen. The following information is available in the Cloudways application dashboard in the Access Details under the MYSQL ACCESS tab.
Enter the database credentials.
Don’t use the default Table Prefix wp_ for security reasons. Give it any name. Using a different table prefix, you can run more than one WordPress installation in a single database. Also, if you use the same table prefix, it will overwrite the previous WordPress installation and break your old site. So, always use a different Table Prefix. You can use it as your folder name or anything else.
Step 5: Run The Installation
After entering the Mysql Access Credentials, in the next window, you can see like below-
Click on Run the Installation. After that, you should see like below-
The Above information is for Admin and Site title. Enter the details as your wish. It is the admin username and password you will use when logging into your website. Click on Install WordPress.
When the Installation is Complete, it should be like this-
Step 6: Change Application Site URL & Home Address ( Also called “Domain Management”)
For this step follow step number 6 from method 1 mentioned above called Backend Method or FTP Access. After step 6 is done your Installation is complete.
If you want to install two or more different WordPress installations, follow Method 2 (Frontend Method) for any blogs or any web hosting provider.
Note: We have created a
wp-config.php file using the above method. If for any reason this automatic file creation doesn’t work, don’t worry. All this does is fill in the database information to a configuration file. You may also simply open
wp-config-sample.php in a text editor, fill in your information, and save it as
wp-config.php. Read here how to edit a wp-config.php file (edit only if the automatic installation fails).
This was how you can Install a Separate WordPress Application on a subfolder in Cloudways. If you have any trouble let us know below-