Install PHP Application and WordPress Alongside Each Other
You have a webpage like http://www.example.com and you would like to serve both WordPress and files from a PHP application from the root domain. For instance, opening
will open a post on WordPress and
will open a page in a PHP application.
- Set up your php application in /var/www/html
- Install WordPress /usr/share/wordpress
- Put the following lines into /usr/share/wordpress/.htacces before # BEGIN WordPress.
- Put the following line into /etc/httpd/conf/httpd.conf
Alias /app /var/www/html
- Add the following configuration file to /etc/httpd/conf.d/wordpress.conf
Alias /wordpress /usr/share/wordpress DocumentRoot /usr/share/wordpress
<Directory /usr/share/wordpress/> AddDefaultCharset UTF-8
Require all granted
Restart httpd and you are all done!