Question

How do I install a secondary wordpress in a Subdirectory, in CentOS using cpanel?

Posted April 23, 2020 253 views
CentOS

Hello guys,
Would you like to help me install wp in a subdirectory folder on CentOS, using cPanel?

Droplet: cPanel & WHM® 86.0.16 on CentOS 7.6

What I want: to install wp on a subdirectory: test.com/articles/
,where test.com is already an installed wordpress.

What I do not want: a subdomain like articles.test.com

Thank you in advance.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

Hi @alex441659ee6dd,

You can do that with a few simple steps.

  • You’ll need to create the subdirectory.

  • Download the wordpress files from the WordPress website itself, you can do that by clicking on this link - WordPress Download . Another possible way is for you to SSH to your server

ssh root@YourDropletIP

Then enter the newly created directory articles like so

cd /path/to/articles/folder

Remember to change the path to the actual one!

Once in, execute the following command

wget https://wordpress.org/latest.zip

This will directly download the wordpress zip file in to your folder.

  • Now that you have the file downloaded on your server, you’ll need to unzip it. You can do that by executing the command
unzip latest.zip

This will unzip the file in the directory it’s in.

  • You’ll need to create a database for your WordPress website. To do that, go to your cPanel –> MySQL Wizard and create a MySQL with a Username attached to it.

  • Open your website https://test.com/articles/ and follow the installation process.

That’s it, you’ll now have a WordPress installation in your subdirectory.

Regards,
KDSys

Hello, @alex441659ee6dd

With cPanel/WHM you can also integrate auto-install and auto-upgrade plugins for WordPress and many other CMSs. You can use Softaculous, Instalatron, Cloudron and any other plugin that has integration for cPanel/WHM

Using a plugin can save you time when you need to quickly deploy a WordPress installation on a test subdomain just like in your case. Plugins like that also have tons of apps that you can quickly install and update.

Regards,
Alex

Submit an Answer