Skip to content

Instantly share code, notes, and snippets.

@morvy
morvy / install.php
Last active February 12, 2024 09:20 — forked from tschoffelen/install.php
[WP installer] A simple PHP script that automatically downloads and unzips the latest version of Wordpress in the current directory (./), so that I don't have to download it and upload it to my server through FTP manually. #wordpress #installer
<?php
echo '<span style="color:green">Extracting WordPress...</span>' . PHP_EOL;
// Download the latest WordPress ZIP file
download_wordpress_zip();
// Extract and move WordPress files
if (extract_and_move_files()) {
// Remove 'wordpress' folder and installer
remove_directory("wordpress");