{"id":25419492,"url":"https://github.com/iambotcoder/vagrant-automate-wordpress","last_synced_at":"2026-04-11T11:39:52.380Z","repository":{"id":276465486,"uuid":"929370335","full_name":"iambotcoder/vagrant-automate-wordpress","owner":"iambotcoder","description":"This repository contains a `Vagrantfile` to set up an Ubuntu-based virtual machine with Apache, MySQL, PHP, and WordPress.","archived":false,"fork":false,"pushed_at":"2025-02-08T12:01:20.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-12T17:13:29.841Z","etag":null,"topics":["apache","devops","mysql","php","vagrant","wordpress"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iambotcoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-08T11:47:38.000Z","updated_at":"2025-02-17T16:50:31.000Z","dependencies_parsed_at":"2025-02-08T12:41:14.350Z","dependency_job_id":null,"html_url":"https://github.com/iambotcoder/vagrant-automate-wordpress","commit_stats":null,"previous_names":["iambotcoder/vagrant-automate-wordpress"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iambotcoder/vagrant-automate-wordpress","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iambotcoder%2Fvagrant-automate-wordpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iambotcoder%2Fvagrant-automate-wordpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iambotcoder%2Fvagrant-automate-wordpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iambotcoder%2Fvagrant-automate-wordpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iambotcoder","download_url":"https://codeload.github.com/iambotcoder/vagrant-automate-wordpress/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iambotcoder%2Fvagrant-automate-wordpress/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279099531,"owners_count":26103309,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-15T02:00:07.814Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache","devops","mysql","php","vagrant","wordpress"],"created_at":"2025-02-16T18:48:54.802Z","updated_at":"2025-10-15T18:06:38.841Z","avatar_url":"https://github.com/iambotcoder.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 WordPress Setup with Vagrant\n\n## 📌 Overview\nThis project sets up a **WordPress** environment using **Vagrant** and **VirtualBox**. The configuration provisions an Ubuntu virtual machine and installs Apache, MySQL, PHP, and WordPress automatically.\n\n\n## Prerequisites\nBefore using this Vagrant configuration, ensure you have the following installed:\n\n## 🛠️ Prerequisites\nBefore starting, ensure you have the following installed:\n- [Vagrant](https://www.vagrantup.com/downloads)\n- [VirtualBox](https://www.virtualbox.org/wiki/Downloads)\n\n\n## 📥 Getting Started\n\nFollow these steps to set up the environment:\n\n## Setup Instructions\n\n### 1️⃣ Initialize Vagrant\nRun the following command to initialize a new Vagrant environment:\n```bash\nvagrant init\n```\n\n### 2️⃣ Start the Virtual Machine\nRun the following command to start the VM:\n```bash\nvagrant up\n```\n\n### 3️⃣ Access the VM\n```bash\nvagrant ssh\n```\n\n### 4️⃣ Open WordPress in Browser\nOnce the setup is complete, open your browser and visit:\n```\nhttp://192.168.56.98\n```\n\n## Configuration Details\n\n- **Base Image:** Ubuntu 22.04 (Jammy Jellyfish)\n- **Private Network IP:** `192.168.56.98`\n- **Memory Allocation:** 1600MB\n- **Provisioned Services:**\n  - Apache Web Server\n  - MySQL Database Server\n  - PHP and required extensions\n  - WordPress installation with pre-configured database\n\n## Files Included\n\n### 📜 Vagrantfile\n```ruby\n# -*- mode: ruby -*-\n# vi: set ft=ruby :\n\nVagrant.configure(\"2\") do |config|\n  config.vm.box = \"ubuntu/jammy64\"\n  config.vm.network \"private_network\", ip: \"192.168.56.98\"\n  \n  config.vm.provider \"virtualbox\" do |vb|\n    vb.memory = \"1600\"\n    vb.gui = false\n  end\n  \n  config.ssh.insert_key = false\n  config.ssh.private_key_path = \"~/.vagrant.d/insecure_private_key\"\n  \n  config.vm.provision \"shell\", inline: \u003c\u003c-SHELL\n  sudo apt update\n  sudo apt install apache2 \\\n                   ghostscript \\\n                   libapache2-mod-php \\\n                   mysql-server \\\n                   php \\\n                   php-bcmath \\\n                   php-curl \\\n                   php-imagick \\\n                   php-intl \\\n                   php-json \\\n                   php-mbstring \\\n                   php-mysql \\\n                   php-xml \\\n                   php-zip -y\n           \n  sudo mkdir -p /srv/www\n  sudo chown www-data: /srv/www\n  curl https://wordpress.org/latest.tar.gz | sudo -u www-data tar zx -C /srv/www\n  \n  cat \u003e /etc/apache2/sites-available/wordpress.conf \u003c\u003cEOF\n\u003cVirtualHost *:80\u003e\n      DocumentRoot /srv/www/wordpress\n      \u003cDirectory /srv/www/wordpress\u003e\n          Options FollowSymLinks\n          AllowOverride Limit Options FileInfo\n          DirectoryIndex index.php\n          Require all granted\n      \u003c/Directory\u003e\n      \u003cDirectory /srv/www/wordpress/wp-content\u003e\n          Options FollowSymLinks\n          Require all granted\n      \u003c/Directory\u003e\n\u003c/VirtualHost\u003e\nEOF\n  \n  sudo a2ensite wordpress\n  sudo a2enmod rewrite\n  sudo a2dissite 000-default\n  \n  mysql -u root -e 'CREATE DATABASE wordpress;'\n  mysql -u root -e 'CREATE USER wordpress@localhost IDENTIFIED BY \"admin123\";'\n  mysql -u root -e 'GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON wordpress.* TO wordpress@localhost;'\n  mysql -u root -e 'FLUSH PRIVILEGES;'\n  \n  sudo -u www-data cp /srv/www/wordpress/wp-config-sample.php /srv/www/wordpress/wp-config.php\n  sudo -u www-data sed -i 's/database_name_here/wordpress/' /srv/www/wordpress/wp-config.php\n  sudo -u www-data sed -i 's/username_here/wordpress/' /srv/www/wordpress/wp-config.php\n  sudo -u www-data sed -i 's/password_here/admin123/' /srv/www/wordpress/wp-config.php\n  \n  systemctl restart mysql\n  systemctl restart apache2\n  SHELL\nend\n```\n\n## Accessing WordPress\nAfter setting up the VM, open a browser and go to `http://192.168.56.98` to complete the WordPress installation.\n\n![Screenshot 2025-01-28 065140](https://github.com/user-attachments/assets/ef68bd1a-d517-499c-9fb0-890502820780)\n\n\n## Stopping the VM\nTo stop the virtual machine, run:\n```sh\nvagrant halt\n```\n\n## Destroying the VM\nTo remove the virtual machine completely, run:\n```sh\nvagrant destroy -f\n```\n\n## 📚 Conclusion\nThis setup provides a **quick and automated way** to deploy a WordPress environment using Vagrant and VirtualBox. You can modify the `Vagrantfile` to suit your project needs.\n\n## 👨‍🏫 Instructor\nThis project was guided by **Imran Teli**, who provided valuable mentorship throughout the process.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiambotcoder%2Fvagrant-automate-wordpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiambotcoder%2Fvagrant-automate-wordpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiambotcoder%2Fvagrant-automate-wordpress/lists"}