Get rid of “Another update is currently in progress” in WordPress

When you updating one of your resources in wordpress, accidentally you close the window (that’s what I did).

Then when you try to update it again, there is still another process already running. You need to get rid of this before you continue.

Use wp-cli:

wp option delete core_updater.lock

WordPress still cannot Establishing a Database Connection – Error

Have you ever experiencing this problem like this? after your install wordpress, setup anything, webserver, database, everything is completed. Yet, wordpress still cannot establishing your database connection.

Eventhough you’ve already make sure that your database is up and running (I’m using MySQL) and your port is already open, though.

Trust me! I’ve done anything properly, I spent hours just to figure out what the root cause was and after some googling and stackoverflowing, I found this problem was due to SE in linux.

$ sudo setsebool -P httpd_can_network_connect_db=1

Thanks in advance SElinux!

How to change wordpress homepage URL

I moved my wordpress blog from my localhost to new hosting (new domain), and I was lazy to install the new one and I just copied all of my directory and upload it to new hosting. After a few configuration, my blog back to online with new domain, but the home page url was still referring to old url (my localhost url).

Few minutes later after googled the problem, I found out these two lines need to be added in wp-config.php, just put these damn codes at the top before database configuration.

define('WP_HOME','http://your-new-url.com');
define('WP_SITEURL','http://your-new-url.com');

and save to override the homepage url stuck.

WordPress basic htaccess

I guess my wordpress turned into jeopardy because I didn’t realize I moved from nginx to apache, and apache needs .htaccess file for permalink my links in wp.

This is just default htaccess config :

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress