Symfony + wordpress

0

I'm doing a symfony that will have a wordpress subsection. The fact is that I have the wordpress installation under the web / wordpress folder.

I followed the following manual: link

But I do not know what I have to put in the routing so that this folder works as an independent wordpress, I've tried with:

wordpress:
    path: web/wordpress
    defaults: 
        _file: web/wordpress/index.php


wordpress:
    path: wordpress
    defaults: 
        _file: wordpress/index.php
    
asked by web developing 26.05.2017 в 10:04
source

2 answers

1

I have it working on several web pages and the easiest thing is to do it directly in the Apache configuration, I'll give you an example:

<VirtualHost *:80>
  ServerName  midominio.com
  ServerAlias www.midominio.com
  DocumentRoot /var/www/midominio.com/current/web

  <Directory "/var/www/midominio.com/current/web">
    DirectoryIndex index.html index.php
    Options FollowSymLinks
    AllowOverride All
  </Directory>

 Alias /blog /var/www/blog.midominio.com/

 <Directory "/var/www/blog.midominio.com">
    DirectoryIndex index.html index.php
    Options FollowSymLinks
    AllowOverride All
  </Directory>

  LogLevel notice
  CustomLog "/var/log/httpd/midominio.com_ssl.access.log" combined
  ErrorLog  "/var/log/httpd/midominio.com_ssl.error.log"
</VirtualHost>

With this, who is in charge of everything is Apache and thus you do not have to make modifications in Symfony of any kind.

In the same way, Wordpress and Symfony are in separate directories and you save possible collisions.

    
answered by 26.05.2017 / 10:16
source
0

Once I had to perform a similar task. To fix it, use this Bundle

The way to use is well detailed in the documentation

It's a bit extensive but it worked.

There is also this other Bundle that I did not try but it can work: link

Greetings

    
answered by 26.05.2017 в 14:49