KBAISE/ for lovable
Library
Docs

Connect your app to WordPress (self-hosted)

about 10 minBuildingchecked 25h agoOfficial page
The short version

Connect your self-hosted WordPress site to Lovable to load, display, and manage your posts, pages, and media inside your app. You authenticate once using a WordPress Application Password, and your app communicates directly with your site's content.

Anyone who runs their own WordPress website and wants to build a custom web app or frontend using their WordPress content.

Do this, in order

  1. 1

    Sign in to your WordPress admin dashboard and check that Permalinks are not set to 'Plain' under Settings > Permalinks.

    The WordPress REST interface requires clean URL structures to communicate with external apps like Lovable.

  2. 2

    Go to Users > Profile in your WordPress admin, scroll down to Application Passwords, name it 'Lovable', and click 'Add New Application Password'.

    Lovable needs an Application Password to authenticate securely without using your primary account password.

  3. 3

    Copy and save the generated password, and note your WordPress username and HTTPS site URL.

    WordPress displays this password only once, and you need all three items to configure the connection.

  4. 4

    In Lovable, navigate to Connectors, select 'WordPress (self-hosted)', and click 'Connect'.

    This opens the configuration screen to link your WordPress site to your Lovable workspace.

  5. 5

    Enter a display name, your WordPress site's HTTPS URL, your username, and the Application Password, then set your sharing preference and click 'Connect'.

    Lovable validates your credentials directly against your WordPress site and saves the connection.

  6. 6

    Open your Lovable project chat and ask Lovable to link your project to the WordPress connection and build your interface.

    Linking allows the project to fetch content, display posts, or send updates back to your WordPress site.

Paste this into your project

Connect this project to my self-hosted WordPress site using the WordPress (self-hosted) connector. Build a clean blog page that displays the latest published posts, including their titles, excerpts, featured images, and publishing dates, with a detail view when clicking on an individual post.

Words decoded

Application Password
A unique, auto-generated code created in WordPress that lets outside apps interact with your site without knowing your personal account password.
REST API
A standardized way for two different web apps to communicate and share data over the internet.
Permalinks
The web address format WordPress uses for your posts and pages. Setting them away from 'Plain' gives pages readable URLs like '/sample-post/' instead of '/?p=123'.
Self-hosted WordPress
A WordPress site hosted on your own server or web host (WordPress.org), distinct from sites hosted directly on WordPress.com.

Where people get stuck

  • Do not use this connector for WordPress.com-hosted websites; it only works with self-hosted WordPress sites.
  • Do not use an unencrypted 'http://' address; the site must use a secure 'https://' URL.
  • Do not leave WordPress Permalinks set to 'Plain', or the connection will fail with a route error.
  • Lovable actions in your app are restricted by the WordPress user role you use for the Application Password; an author account cannot perform administrator tasks.
  • Each connection represents a single shared WordPress user account; it does not allow your app's end-users to log in with their own WordPress accounts.

The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.