KBAISE/ for lovable
Library
Docs

Connect your app to WordPress (self-hosted)

about 10 minBuildingchecked 32h agoOfficial page
The short version

You can connect your Lovable app to your own WordPress website to manage content like posts, pages, and media. This lets you build custom apps that display or update information on your WordPress site without needing to log into WordPress directly.

Anyone who wants to build a custom app that interacts with content on their self-hosted WordPress website.

Do this, in order

  1. 1

    Sign in to your WordPress admin dashboard for the site you want to connect.

    This is where you will get the special password Lovable needs to connect to your site.

  2. 2

    Go to 'Users' then 'Profile' (or 'All Users' to edit another user's profile).

    You need to access the profile settings for the WordPress user account that Lovable will use.

  3. 3

    Scroll down to 'Application Passwords', give it a name like 'Lovable integration', and click 'Add New Application Password'.

    This creates a unique password for Lovable to use, which is safer than using your main WordPress password.

  4. 4

    Copy the generated password and securely save it, as WordPress will only show it once.

    You will need this password in the next step to set up the connection in Lovable.

  5. 5

    Note down your WordPress site's full HTTPS URL (e.g., 'https://blog.example.com') and the username for the account you just used.

    These details are essential for Lovable to find and authenticate with your WordPress site.

  6. 6

    Open 'Connectors' in Lovable, select 'WordPress (self-hosted)', and click 'Add connection'.

    This starts the process of creating a new connection between Lovable and your WordPress site.

  7. 7

    Fill in the 'Display name' (e.g., 'WordPress Prod'), 'Site URL' (your HTTPS URL), 'Username', and paste the 'Application password' you copied earlier.

    These are the credentials Lovable needs to securely access your WordPress site.

  8. 8

    Under 'Sharing', choose who can use this connection in your Lovable workspace, then click 'Connect'.

    This determines if only you or other team members can use this WordPress connection in their projects.

Paste this into your project

Connect my Lovable app to my self-hosted WordPress site. I want to read and manage posts, pages, media, and users. I have my WordPress site URL, username, and an Application Password ready.

Words decoded

Self-hosted WordPress
This means you run your WordPress website on your own server or web hosting, not on WordPress.com's service.
WordPress REST API
This is a special way for other computer programs (like your Lovable app) to talk to your WordPress site and ask for information (like posts) or send new information (like a draft post).
Headless CMS
A system where WordPress manages your content, but a separate app (like your Lovable app) handles how that content looks and is displayed to visitors, rather than WordPress doing both.
Application Password
A unique, long password generated by WordPress specifically for other applications to use, instead of your regular login password. It's more secure because you can revoke it without changing your main password.
Permalinks
These are the permanent web addresses (URLs) for your individual posts and pages on WordPress. 'Non-plain' permalinks are usually more readable, like 'yourblog.com/my-great-post' instead of 'yourblog.com/?p=123'.
HTTPS
A secure way for your web browser or app to connect to a website, ensuring that the information exchanged is encrypted and protected.

Where people get stuck

  • Using this connector for WordPress.com sites instead of the dedicated WordPress.com connector.
  • Forgetting to enable HTTPS on your self-hosted WordPress site, which is required for the connection.
  • Not having WordPress version 5.6 or later, which is needed for Application Passwords.
  • Using 'Plain' permalinks in WordPress, which prevents the REST API from working correctly.
  • Sharing your Application Password publicly, as it functions like a regular password.
  • Not having the correct permissions in your Lovable workspace to create connections.
  • Trying to use this connector to manage WooCommerce store operations instead of the specific WooCommerce connector.
  • Expecting the connection to automatically refresh or rotate Application Passwords; you must do this manually in WordPress and update Lovable.
  • Assuming each end-user of your app can log in to WordPress separately; each connection uses a single WordPress account.

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.