Accidentally messed up URLs

Codex has an article on Changing The Site URL, you can edit values in database or override them in config. To have your site work from root you can either relocate WP there altogether or configure it to support root of the site, while still residing in subdirectory. See Giving WordPress Its Own Directory on … Read more

What to do when WordPress posts on a new server return an error 404

Judging from other threads, here are the two most common causes of this problem on freshly built servers: .htaccess override is disabled by apache2.conf Apache mod_rewrite module isn’t enabled. In the file /etc/apache2/apache2.conf: <Directory /var/www/> AllowOverride All </Directory> “AllowOverride” is the switch that tells Apache whether to listen to .htaccess files or not. WordPress relies … Read more

Internal Server Error apache

You might have edited your .htaccess file in Windows notepad or text editor. If you did use Windows text editor then it must have added some special chars in .htaccess file and that will lead to 500 internal server error. Never edit in Windows text editor. Use notepad++ for editing .htaccess and .htpasswd files. second … Read more

Detect CURLOPT_SSL_VERIFYPEER programatically?

From a stackoverflow response: CURLOPT_SSL_VERIFYPEER checks that the remote certificate is valid, i.e. that you trust that it was issued by a CA you trust and that it’s genuine. CURLOPT_SSL_VERIFYHOST checks that the cert was issued to the entity you wanted to talk to. To compare it to a real-life scenario, VERIFYPEER is like checking … 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

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

Installing WordPress in a Sub-Folder (not in root) on Localhost

Why don’t you use WordPress core settings for doing this? This is the recommended way and doesn’t need editing .htaccess or Apache config directly. You can find the details here in WP docs. I’m posting the steps here: After installing WP in the root dir, Go to the Settings->General and change these values: WordPress Address … Read more

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