To download the latest version of WordPress using the Ubuntu command line, you can use the wget utility to grab the official archive directly from WordPress.org. [1]
1. Download the Package
Open your terminal and execute one of the following commands depending on your preferred file format:
- Tarball format (.tar.gz):bash
wget https://wordpress.org/latest.tar.gzUse code with caution. - ZIP format (.zip):bash
wget https://wordpress.org/latest.zipUse code with caution.
2. Extract the Files
Once the download is complete, extract the contents to access the WordPress directory: [1]
- To extract a .tar.gz file:bash
tar -xzvf latest.tar.gzUse code with caution. - To extract a .zip file:bash
unzip latest.zipUse code with caution.
3. Deploy to Web Directory (Example)
bash
# Move the extracted folder to the web root
sudo mv wordpress /var/www/html/your-site-name
# Change ownership to the web server user (www-data)
sudo chown -R www-data:www-data /var/www/html/your-site-name
Use code with caution.
If you are setting up a full website, let me know if you also need help configuring the MySQL database or setting up the Apache/Nginx server blocks for this new installation.
0 Comments