Hi guys,
I am new to digital ocean.
How can I install wordpress in subfolder like this mydomain.com/blog alongside with the express app running on the root folder. how can I setup express to understand that ‘/blog’ is belong to apache web server, and how can I restrict ‘/’ for the apache web server.
Thank you for any response
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.
Click below to sign up and get $100 of credit to try our products over 60 days!
Hello, @birunidev
If you’re already running the express app in the root folder of mydomain.com you can simply create a blog folder inside the root directory and then manually install WordPress inside the blog directory.
You can check the following tutorial on how to install WordPress on a LAMP stack droplet:
You’ll need to have Apache, MySQL/MariaDB and PHP installed on the droplet in order to run WordPress so if this is not already configured you’ll need to complete the LAMP or LEMP setup before installing WordPress.
It is recommended to use a domain name to host your site/app instead of accessing them using the droplet IP address. The domain names will have a different root directory from
/
usually this will be/var/www/domainname.com
or similar. You can configure the Apache virtual host to serve the blog subdomain from any subdirectory.You can also check the tutorial on how to setup Apache virtual hosts:
Hope that this helps! Regards, Alex