I have a Magento 2 installed in /var/www/html/ folder using mydomain.com and I added a WordPress in /var/www/html/pub/wp/ folder using mydomain.com/wp/
When I tried to access mydomain.com/wp/readme.html it’s working fine but all php files are not accessible so I can’t connect to admin mydomain.com/wp/wp-login.php and see my WordPress.
I added this to my nginx configuration but it’s not working :
location /wp/ {
index index.html index.php;
try_files $uri $uri/ /wp/index.php?q=$uri&args;
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index /wp/index.php;
include fastcgi.conf;
}
}
2
Answers
You have installed WordPress at pub/wp but your Nginx config refers just to /wp/. Either modify your Nginx config to refer to /pub/wp/ or move WordPress to the root (eg. /wp/).
https://fishpig.co.uk/magento/wordpress-integration/nginx/
My magento project installed on docker.
My WP site installed in pub/wp/.
When installing i used this documentation https://fishpig.co.uk/magento/wordpress-integration/docs/
I faced with the same problem.
I resolve this problem by changing fastcgi_pass value to the value what is used in my docker container (fastcgi_backend):
After that you need to change siteurl and home value in wp_options table