I’ll walk you through the manual installation method. This gives you full control over your files and database, which is better for a developer-centric setup.
Phase 1: The Foundation (Hosting & Files)
- Get Hosting and a Domain
- Hosting: You need a server with PHP 7.4+ and MySQL 8.0+ (or MariaDB).
- Domain: Point your domain’s A-Record to your server’s IP address.
- Download WordPress
- Go to WordPress.org and download the latest .zip file.
- Unzip it on your computer. You will see a folder named wordpress.
- Upload Files
- Use an FTP client (like FileZilla) or your hosting’s File Manager.
- Upload the contents of the wordpress folder to your server’s root directory (usually public_html or www).
Phase 2: The Database (The “Brain”)
- Create a MySQL Database
Log into your hosting control panel (cPanel, DirectAdmin, etc.) and:
- Create a new Database (e.g., my_gemini_site).
- Create a new Database User (e.g., gemini_user) with a strong password.
- Add the User to the Database and grant “All Privileges.”
Phase 3: The Famous 5-Minute Install
- Run the Script
- Open your browser and go to your domain (e.g., https://yourdomain.com).
- Select your language and click Continue.
- Database Setup: Enter the Database Name, Username, and Password you created in Step 4. Keep “Database Host” as localhost unless your host says otherwise.
- Site Details: * Site Title: Whatever you want.
- Username/Password: This is for your WordPress login. Do not use “admin” as a username.
- Click Install WordPress.
Phase 4: Integrating the Gemini Code
Now that your site is live, let’s add the logic we built earlier.
- Setup the Folder Structure
- Log into your WordPress Dashboard (/wp-admin).
- Go to Appearance > Themes. I recommend using a lightweight theme like Astra or Hello Elementor.
- Connect via FTP and navigate to /wp-content/themes/[your-active-theme]/.
- Create a folder named inc.
- Upload the Parsedown.php file into that /inc/ folder.
- Add the Logic
- Open the functions.php file of your theme.
- Paste the “Gemini Bulk Article Creator” code we discussed earlier at the very bottom of the file.
- Crucial: Replace ‘YOUR_GEMINI_API_KEY’ with your actual key from Google AI Studio.
Phase 5: Testing Your AI Site - Refresh your WordPress Dashboard.
- Look for the “Gemini Creator” icon in the sidebar.
- Type a test topic like “The Future of PHP in 2026” and click Generate.
- Go to Posts > All Posts. You should see your new article as a Draft.
- Click Preview to see how the Markdown was converted to HTML.
Pro Checklist for a PHP Developer: - Permalinks: Go to Settings > Permalinks and set it to “Post Name” for clean URLs.
- Security: Install the Wordfence plugin. Since you are using an API, it’s good to have a firewall.
- SEO: Install Yoast SEO or Rank Math so the “Meta Description” code we wrote has a place to live.
Would you like me to help you create a custom .php template for your theme to display these articles in a specific layout?
Leave a comment