• ResolvedModerator keesiemeijer

    (@keesiemeijer)


    Hello I’m testing wordpress 3.0 and it looks really good. But I have trouble implementing the new Network (multisite) feature. I used Mamp and Headdress (Mac) to create the local site. This produces url’s like these: https://localhost:9016/ When I try to make a “Network” I get the following error: “Error: You cannot install a network of sites with your server address. You cannot use port numbers such as :9016.” What local address does work? Or is a network on a local site not possible right now? I would really like this feature for multilingual sites but I need the ability to develop local.

Viewing 15 replies - 16 through 30 (of 52 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    I dont think you put something like this in your host file.

    127.0.0.1 localhost
    127.0.0.1 mainsiste.dev/subsite1
    127.0.0.1 mainsiste.dev/subsite2

    Then it will not work.
    To access this host file in Mac Finder: Go > Go To Folder, and type in: “/etc”. A normal finder window will appear. In this window you find the file called “hosts”. Open it with a text editor. After you edited and saved this file you have to clear your DNS cache or reboot for the changes to take effect. To clear DNS cache in Leopard or Snow Leopard, just type this in your Terminal (Applications/Utilities/Terminal.app) and hit enter”
    dscacheutil -flushcache
    (it’s also better to use Mamp for local development sites in stead of Snow Leopard’s own Apache!)

    Moderator keesiemeijer

    (@keesiemeijer)

    and for every virtual host use something like this:

    <VirtualHost *:80>
    DocumentRoot "/Users/username/Sites/mainsiste.dev/subsite1"
    ServerName mainsite.dev/subsite1
    <Directory "/Users/username/Sites/mainsiste.dev/subsite1">
        AllowOverride All
    </Directory>
    </VirtualHost>

    directory path inside quotes and full path to individual sites

    Thanks much for the suggestions so far. The hosts file had been updated, else I would never have gotten mainsite.dev to feed me the WP’s mainsite content. But I had not done any mapping of the subsites as suggested. So took care of the subsites in hosts and vhosts.conf. Unfortunately, the situation remains unchanged. WP only serves up mainsite.dev, with just the directory listings for the subsites, which are physically empty.

    One thing I did notice in keesiemijer’s settings’ suggestions above, is that it has mainsite as a subdirectory in Sites. I’ve got everything at the Site’s root, figuring that might be less prone to error. Will try moving everything one level down and see if that triggers any changes?

    As noted earlier, I went this rout as the MAMP solutions above were not working for me (have used Single User WP on MAMP successfully for years). Figured I would give the native Snow Leopard package a try–again noting that it’s a bit harder to get the Apache/Php/Mysql thing set up than with MAMP. But once up, figured I would be no worse off. And indeed, I’m visibly further along, as with MAMP I could not get the mapping to even serve me WP’s on main site for installation. Also, if this could work, be another set of options for folks. But close is not close enough, so maybe I will need to go back and try again with my MAMP configurations.

    Moderator keesiemeijer

    (@keesiemeijer)

    One thing I did notice in keesiemijer’s settings’ suggestions above, is that it has mainsite as a subdirectory in Sites.

    If that is where your wordpress files live. I think you have to link to each individual site (folder) in your Sites Folder. Maybe not to the subsites. Maybe this is enough for your mainsite setup with subsites:

    127.0.0.1 localhost
    127.0.0.1 mainsite.dev
    <VirtualHost *:80>
    DocumentRoot "/Users/username/Sites/mainsite"
    ServerName mainsite.dev
    <Directory "/Users/username/Sites/mainsite">
        AllowOverride All
    </Directory>
    </VirtualHost>

    Thanks again. Back at it with little change.

    First off. Very newbie question for WP multi sites. When a new site is created by Super Admin, does WP automatically create the directory in blogs.dir for that site [#]? If not, is there any other physical representation of the site that can be seen in the file structure/the new site(subsite’s) actual folder following the site’s creation. I ask because I’m not seeing anything in the blogs.dir folder, but am not getting any kind of error that the directory could not be created? If all content goes into blogs.dir/[#] and themes are all in themes, trust WP proper does nothing with the site’s physical path folder?

    Probably more critical the _site_meta table shows nothing for any subsites. Meta data only for site[1]. The _bolg table has all sites though. Guess I should have checked this out earlier, but certainly going to be a problem with no theme info to help serve the page. But surprised I’m not getting any errors? This is a whole other basket of issues I trust.

    Regarding the directive: DocumentRoot “/Users/username/Sites/mainsite”, etc.
    I do not have a folder names mainsite. So ../Sites/ itself is the folder for mainsite’s content. All files are in the Sites/ root, e.g. …/Sites/wp-config.php, etc.. So unclear on where such a directive would be pointing?

    Each blog is virtual – whether it is a subdomain or subfolder blog, nothing is created on the server. the blogs/dir directory only hold media uplads for each site.

    the site_meta table is old terminology from when it was MU. In new terms, that’s *network* meta.

    Deeper reading in the archives at wpmututorials.com

    Thanks Andrea,

    Han indeed seen your tutorials site, and lots of others. You must be pretty tired of users like me, especially when typing things like site_meta instead of _sitemeta. Also saw the discourse on terminology changes so should have been more careful there as well. Anyhow, if someone is interested would just like to know the following?

    1) A subdirectory under blogs.dir should be automatically created for each site. (Now when I upload media to the main site via “Add New” in “Posts” it gets stored in the old Uploads/yr/mo folder.

    2) Should not _sitemeta data be populated for the any new site when the site is created? All the site’s new tables are created but that table is not populated?

    Thanks

    1) A subdirectory under blogs.dir should be automatically created for each site.

    Not until the user of that site uploads media files. the blogs(sites) are virtual and you will not find site-specific files on the server.

    2) Should not _sitemeta data be populated for the any new site when the site is created? All the site’s new tables are created but that table is not populated?

    remember the old terminology? ?? sitemeta is for the *network*, not Sites. You’re running one network. No additional info is needed if you add another blog (Site).

    blogs in the db = Sites in the admin area
    site in the db = network in the backend.

    Thanks again Andrea,

    See all the subsite meta data populated in the appropriate subsite option’s folder now. Should have thought to look there. With that I can now go back to nailing down getting vhosts and .htaccess playing together so I might actually be able to display one of these subsites.

    vhosts are only used for the subdomain option, and wildcard subdomains will not work on localhost. ??

    just to save the head bashing.

    How about a local subdomain setup. Would you just add the line for “ServerAlias *.mycoolsite.dev” as in the example code below?

    <VirtualHost *:80>
    DocumentRoot "/Users/[Your User Name]/Sites/mycoolsite"
    ServerName mycoolsite.dev
    ServerAlias *.mycoolsite.dev
    <Directory "/Users/[Your User Name]/Sites/mycoolsite">
        AllowOverride All
    </Directory>
    </VirtualHost>

    You would do that on a web server, but not on your local machine, as stated above, because the *.yourdomain.com will not work locally.

    OK. So, instead I just setup the subdomains in my local “hosts” file.

    127.0.0.1 subdomain1.mycoolsite.dev
    127.0.0.1 subdomain2.mycoolsite.dev
    127.0.0.1 subdomain3.mycoolsite.dev
    Etc.

    Thanks.

    Can anyone point me in the right direction for getting an existing 3.0.1 network site moved locally for development? I’m using XAMPP and spent yesterday exporting the DB from the live site, copying wp_content, importing the DB into xampp and and dropping the WP-3.0.1 files and my wp_content directory into htdocs. I then changed siteurl and home in the db to https://localhost/domain/ in the DB and updated wpconfig with the DB info. When I try to navigate to https://localhost/domain/, I get to the site’s 404 page and a message saying https://localhost/domain/domain/ doesn’t exist. Any help or a link to tut on this? Thanks much.

    ~Josh

    The URL is saved in far more tables. Do a search on the db.

Viewing 15 replies - 16 through 30 (of 52 total)
  • The topic ‘wordpress 3 network (multisite) on a local development site’ is closed to new replies.