Hosting a Vue app on WordPress works the same way as any built browser app: you build it, zip the output, and upload it. There’s just one build setting to get right so it works at your URL. This guide covers both Vite-based Vue and the older Vue CLI.
New to the flow? Deploy your first app is the quick walkthrough with screenshots.
Set a relative base
When Vue builds, it writes the links to your JavaScript and CSS into index.html. By default those
links often assume your app is at the root of a domain (/assets/…). Since your app will live at
your-site.com/your-app, set a relative base so the links resolve wherever the app is mounted.
Vite (Vue 3 — the modern default)
In vite.config.js:
export default { base: './',};Vue CLI
In vue.config.js:
module.exports = { publicPath: './',};App To Page rewrites paths on upload as a backstop, but a relative base is the clean, portable fix.
Build and zip
Run your production build:
npm run buildVue outputs a dist/ folder. Zip the contents so index.html is at the top of the archive:
cd distzip -r ../my-vue-app.zip .Upload it to WordPress
Go to App To Page » Apps, drop the .zip, and fill in the Confirm your app card: pick a
URL, choose who can view it, and tick the trust checkbox. Click Create draft, Preview, then
Publish. See Deploy your first app for the step-by-step with screenshots.
Keep Vue Router deep links working
If your app uses Vue Router in history mode, a bookmarked link like /your-app/settings or a page
refresh needs to reach your index.html so the router can render the route.
On the Confirm-your-app card, open Advanced and leave Single-page app fallback on (the
default). App To Page then routes unknown paths back to index.html, and Vue Router takes it from
there — deep links and refreshes just work.
Frequently asked questions
Can you host a Vue app on WordPress?
Yes. Build your Vue app for production with a relative base, then upload the build with App To Page. It’s served as static files at your chosen URL — no separate host and no code.
Does Vue Router work in history mode?
Yes. Keep Single-page app fallback on and history-mode routes, deep links, and refreshes all resolve correctly.
Vite or Vue CLI — does it matter?
No. Both produce a static dist/ folder. Just set the relative base for whichever you use (base for
Vite, publicPath for Vue CLI) and upload the result.
Can I host a server-rendered Nuxt app?
App To Page serves static, browser-only builds. A fully static Nuxt export works; a Nuxt app that needs a Node server at runtime does not, because App To Page hosts build output rather than running a server.