• Resolved AstroPilot

    (@beastro)


    Hi,
    .
    I am new to WP and have 4 blogs installed under WPMU. In the database they are referenced as wpmu_1_, wpmu_2_ etc.
    I access them only via https://www.mydomain/blogname1, https://www.mydomain/blogname2 etc.

    I use DW CS5 and have XAMPP setup to do local testing.
    WPMU is locally installed to:
    \xampp\htdocs\blogs\

    I imported my mysql database from the online site and changed all references to the online domain to “localhost” and modified the wp-config.php to point to local database and user.

    When I open index.php I correctly see the page layout in live view and the DW addressbar displays https://localhost/index.php. However, asking DW to discover related files, I get an error message :“Dynamically related files could not be discovered because the site definition is not correct for this server”. However, the site is correctly setup for local testing in DW.

    Another problem is accessing individual blogs, as they will look for related files (CSS etc.) in a subdirectory of the base WP directory. Example: Blog1 will look for its theme files in:
    <i>\htdocs\blogs\Blog1\wp-content\themes </i> while in reality those files are located at \htdocs\blogs\wp-content\themes .

    Is there any way to solve this?

    regards

    Berthold

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    That’s how it’s supposed to work.

    Did you copy your .htaccess over? That should redirect things.

    Thread Starter AstroPilot

    (@beastro)

    Hi,

    Yes, the code in htaccess is:

    RewriteEngine On
    RewriteBase /blogs/
    
    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteCond %{REQUEST_URI} ^.*/wp-admin$
    RewriteRule ^(.+)$ $1/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    
    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>

    That code has been created by the softaculous installation of WP via cpanel. I have not modified it so far.

    Thanks

    Berthold

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Well … problem one is your ReWrite Base.

    You can’t have WordPress MultiSite in a non-root folder, if you want the URLs to be from root. With a base of /blog/ your URLs will be: https://www.mydomain/blog/blogname1, https://www.mydomain/blog/blogname2 etc.

    If it’s working at all, I have no idea why.

    Secondly the .htaccess is wrong for subfolders (did you upgrade from WPMU 2.9?)

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /blogs/
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    # END WordPress

    Thread Starter AstroPilot

    (@beastro)

    Yes, I upgraded from 2.9 some time ago.

    On the bright side, none of the blogs is active yet, so I could erase the installation and start from scratch again, since I have not invested time in setup etc. yet.
    Would that be recommended, or is there an easy fix for my issue?

    What would be important to consider in case, I start from scratch again? All in all I will need 3-4 blogs for different parts of my domain. 2 will be managed by myself and 1 or 2 will be owned by associates.

    Thanks for your time and help!

    Berthold

    Thread Starter AstroPilot

    (@beastro)

    On second thought, I cannot move it to the root, as it will interfere with my shopping cart that occupies already the root directory.

    I also recall that it is allright to install WP in its own folder, as long as you use subdirectories and not subdomains. Is that correct?

    In any event, how would I have to modify the htaccess file to make things right?

    Thanks

    Berthold

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I also recall that it is allright to install WP in its own folder, as long as you use subdirectories and not subdomains. Is that correct?

    Yes BUT, as I said, your URLs will ALL have the subfolder name in them.

    https://yourdomain.com/blog means you get this:
    https://yourdomain.com/blog/ (main blog)
    https://yourdomain.com/blog/Site2 (site #2)
    https://yourdomain.com/blog/Site3 (site #3)

    etc etc ??

    In any event, how would I have to modify the htaccess file to make things right?

    That’s what I put here for you: https://www.ads-software.com/support/topic/wpmu-and-dreamweaver-cs5?replies=6#post-1781725

    Thread Starter AstroPilot

    (@beastro)

    Hi,

    In the meantime I reinstalled WordPress and all the blogs associated. One of the problems I had before has been solved, as now fights are linked properly in Dreamweaver now.

    However the other problem I had with Dreamweaver not discovering all related files still exists. I found that this problem only exists if the network is enabled within WordPress. I guess this must be a shortcoming of Dreamweaver not being fully compatible with WordPress network structure.

    Regards

    Berthold Hamburger

    Thread Starter AstroPilot

    (@beastro)

    Hi,

    I just found the answer. Permalinks have to be set to default “ugly” mode to make the discovery feature work in DW…

    Berthold

    beastro is correct, I was having the same issue with a site, even though others worked.
    I could find no difference in the worpress installs, MAMP setups or dreamweaver site settings. Then I checked the Permalinks setting, it was day name for the problem site. Changed it to default and all worked fine.
    That seems to be a problem to me?
    I want day name, how does one deal with this in Dreamweaver?

    many thanks to beastro for the tip
    mark

    beastro – I <3 you. I have been pulling my hair out for three days trying to fix this…. permalinks…. who knew?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘WPMU and Dreamweaver CS5’ is closed to new replies.