Installation problems on a domain-name-less server

Set server_name to the IP address, eg: server { listen 80; server_name 0.1.2.3; // other stuff } You could also leave it out, because the default in ngninx is an empty string. But then all those pieces in WordPress that don’t validate $_SERVER[‘SERVER_NAME’] and similar values … will just break. See ticket #25239 for the … Read more

Automatically enable custom theme, plugins and default content on installation?

Sure. wp_install_defaults() is a pluggable function. (As are wp_new_blog_notification() and wp_upgrade(), in case you ever need to override those too.) # in wp-config.php if ( defined(‘WP_INSTALLING’) && WP_INSTALLING ) { include_once dirname(__FILE__) . ‘/wp-content/install.php’; } # in wp-content/install.php function wp_install_defaults($user_id) { global $wpdb, $wp_rewrite, $current_site, $table_prefix; // do whatever you want here… }

Changing the wp db prefix after installation?

The basic idea should work– change the prefix in both wp-config.php and in the database itself. What isn’t covered would be cases where the prefix is used in other contexts such as when used as part of a “meta” key. Those cases you would need to trace down one by one. You could also have … Read more

Populate content on install

Searching for another thing, just stumbled upon this gem by @anmari 🙂 You have to put a Dropin plugin at the root of wp-content. Should be named install.php and contain a new version of the pluggable function wp_install_defaults. I used this gist for testing. And the only modification from the original function is the default … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)