WordPress version 2.7 has been released and can be upgraded easily using UNIX / Linux shell prompt. A few assumptions:
- WordPress database name: wptheosblog
- WordPress directory name: /var/www/html/theos.in
- WordPress domain name: theos.in
- Operating system: Linux
Step # 1: Backup old files and database
If you run into problems Upgrading WordPress with the three Steps described here, you need to revert to your old version. Login to your hosting account using ssh client. Backup your mysql database, enter:
$ mkdir ~/theos.backup
$ mysqldump -u vivek -p 'passWord' -h localhost wptheosblog > ~/theos.backup/wptheosblog.sql
Now backup all existing wordpress files, enter:
$ mkdir ~/theos.backup/old
$ cd /var/www/html/theos.in/
$ cp -avr * ~/theos.backup/old
Next, login to your wordpress and disable all plugins.
Step # 2: Download wordpress 2.7 in /tmp
Type the following command (use wget command to grab latest version):
$ cd /tmp
$ wget http://wordpress.org/latest.zip -O latest.zip
Sample output:
--03:29:37-- http://wordpress.org/latest.zip Resolving wordpress.org... 72.233.56.139, 72.233.56.138 Connecting to wordpress.org|72.233.56.139|:80... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [application/zip] Saving to: `latest.zip' [ <=> ] 1,849,558 987K/s in 1.8s 03:29:39 (987 KB/s) - `latest.zip' saved [1849558]
Unzip file, enter:
$ unzip latest.zip
Step # 3: Upgrade wordpress
Overwrite all files, enter:
$ cd /var/www/html/theos.in
$ rm -rf wp-admin wp-includes
$ cp -avr /tmp/wordpress/* .
Fire a browser and type
http://yourblog.com/wp-admin/upgrade.php
OR
http://theos.in/wp-admin/upgrade.php
Login to wordpress admin panel and enable all plugins.
🐧 Get the latest tutorials on Linux, Open Source & DevOps via:
- RSS feed or Weekly email newsletter
- Share on Twitter • Facebook • 3 comments... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
Thank you!
Just upgraded tonight. I always knew it was possible but having the steps right there for me pushed me to do it.
Keep up the great site!
thanks, worked great for me…
whew….. it works well. 3 cool steps… seamlessly.
btw hmmm i used to indonesian version of wordpress… how to change them in english