[WordPress]워드프레스 코어 업데이트/WordPress core update

👉워드프레스 코어를 터미널에서 업데이트 하는 방법입니다.
How to update WordPress core from terminal.

👉 다음 과정처럼 실행하면 워드프레스 코어를 쉽게 업데이트 할 수 있습니다.
You can easily update WordPress core by following these steps:

1.wp 설치여부 확인
Check if wp is installed

which wp

1-1.wp가 없다면 설치하기(Ubuntu/Linux기준)
Installing WP if you don’t have it (Ubuntu/Linux)

# wp-cli.phar 다운로드 / Download
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

# 실행 권한 부여 / Grant execution permission
chmod +x wp-cli.phar

# 시스템 전역 명령어로 이동 / Go to system-wide commands
sudo mv wp-cli.phar /usr/local/bin/wp

# 설치 확인 / Check installation
wp --info

2.코어 업데이트 방법(다운그레이드 포함)
How to update your core (including downgrading)

cd /path/to/wordpress
wp core update --version=최신버전 / latest version
wp core update-db

3.버전 지정하지 않고 무조건 최신버전 코어 업데이트 하는경우
If you update to the latest version of the core without specifying the version,

wp core update --allow-root # 루트 권한으로 실행 / Run with root privileges
# sudo -u USER -i -- wp <command> # sudo로 실행 / run with sudo

wp core update-db --allow-root # 루트 권한으로 실행 / Run with root privileges
#  sudo -u USER -i -- wp <command> # sudo로실행 / Run with sudo

Leave a Reply