.htaccess 301 vs. 302 Enforcing HTTPS

The different .htaccess/mod_rewrite directives you see around are usually because of differences in the server configuration (nothing to do with WordPress) and where they are being used. There’s no such thing as a one size fits all. (For instance, the above redirect may not work if you are behind an SSL proxy.) However, as with … Read more

What are some good Apache settings to use with wordpress?

Just to break cycle of “doesn’t belong here”. WordPress basically has no specific requirements for web server itself (which doesn’t even have to be Apache), aside from permalinks. The message you are getting seems to be performance-related and may or may not be connected to you using WordPress. For starters check if your traffic had … Read more

Does WP Have a Function To Generate .htaccess RewriteCond?

In short yes… ‘External’ Rewrite Rules If in add_rewrite_rule the rule is isn’t directed to index.php then the rule is treated as an ‘external’ rule (i.e. not to be processed by WordPress’ internal handing of rewrites) and instead written to the .htaccess file. I.e. if: add_rewrite_rule(‘^nutrition/([^/]*)/([^/]*)/?’,’somethingelse.php?p=12&food=$1 &variety=$2′,’top’); is used instead of add_rewrite_rule(‘^nutrition/([^/]*)/([^/]*)/?’,’index.php?p=12&food=$matches[1]&variety=$matches[2]’,’top’); Then the rule … Read more

Universal problem: first request after ~25 second inactivity always slower (~1 second) than subsequent requests (~1/10sec)

Without looking at your box to see exactly what’s going on, here are some potential avenues of slowness: Potential Causes Apache Apache is usually configured in such a way that a single httpd process is always running in the background. When a request comes in over the wire, it spins up a new httpd process … Read more

Which Apache-modules must I enable?

Here is the list of minimum Apache modules which is required to run WordPress websites. mod_alias mod_authz_host mod_deflate mod_dir mod_expires mod_headers mod_mime mod_rewrite mod_log_config mod_autoindex mod_negotiation mod_setenvif

What’s the proper way to setup WP-CLI on Ubuntu so that I don’t have to use the flag –allow-root?

All files and folders should be owned by www-data user and group if not then WordPress can’t change files hence fails to update from dashboard. wp-cli says to use sudo -u www-data -i — wp <command> but that gives This account is currently not available. Why? See this answer: https://askubuntu.com/a/486661/695240 You’re getting the This account … Read more

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