By craig198396
I’ve run several WPMS installs in the past, but never run into this.
Environment:
So files are in /var/www/domain.com/public_html and WordPress install goes swimmingly. check the vanilla install and can update plugins, upload media, etc.
Turn on WPMS using: define(‘WP_ALLOW_MULTISITE’, true);
Jump back in and the Tools > Network Setup is there. Recommended config defines are: define(‘MULTISITE’, true); define(‘SUBDOMAIN_INSTALL’, false); define(‘DOMAIN_CURRENT_SITE’, ‘domain.com’); define(‘PATH_CURRENT_SITE’, ‘/’); define(‘SITE_ID_CURRENT_SITE’, 1); define(‘BLOG_ID_CURRENT_SITE’, 1);
and the .htaccess recommendations are also standard. Plug those in… and run bang into “Error establishing a database connection”
So something strange is happening between the standard and the WPMS install: probably something to do with the path because of the virtual host setup. I notice that these instructions are only for running in the root (with IP address as DOMAIN_CURRENT_SITE) but I’ve run WPMS in similar virtual host environments before without issues.
Help appreciated!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Here’s some info. from the <a href=“http://codex.wordpress.org/Multisite_Network_Administration”>WordPress Codex</a>:<br/><h2>Apache Virtual Hosts and Mod Rewrite</h2>To [allow] <strong>mod_rewrite</strong> to work within an Apache Virtual host [make sure you enable it, first; and] you may need to set some options on the DocumentRoot.<br/><br/><code><VirtualHost *:80><br/> DocumentRoot /var/www/vhosts/wordpress<br/> <Directory /var/www/vhosts/wordpress><br/> AllowOverride Fileinfo Options<br/></Directory></code><br/><br/>In some instances, you will need to add <strong>All</strong> to your <strong>AllowOverride</strong> for all .htaccess rules to be honored.
Add these in: <br> <br>define(‘WP_DEBUG’, true); <br>define(‘WP_DEBUG_LOG’, true); <br>define(‘WP_DEBUG_DISPLAY’, true); <br>define(‘SAVEQUERIES’, true); <br> <br>Reload the wordpress site, do you see any errors?
I have a hunch that the way you’re structuring your directories what’s causing you problems… lemme look into it some more.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.