I just deployed my site to production but runnning into sage problems with 404 on all assets and even uploads.
I confirmed that all files are present on the server but server returns 404 on those files. When trying to access an uploaded file directly I get the default 404 page in wordpress.
This is my vite.config.js
import { defineConfig } from 'vite'
import tailwindcss from '@tailwindcss/vite';
import laravel from 'laravel-vite-plugin'
import { wordpressPlugin, wordpressThemeJson } from '@roots/vite-plugin';
import { resolve } from 'path'
export default defineConfig({
base: '/app/themes/trust/public/build',
envDir: resolve(__dirname, '../../../../'),
assetsInclude: [
'**/*.svg',
],
plugins: [
tailwindcss(),
laravel({
input: [
'resources/css/app.css',
'resources/js/app.js',
'resources/css/editor.css',
'resources/js/editor.js',
],
refresh: true,
url: process.env.APP_URL,
}),
wordpressPlugin(),
wordpressThemeJson({
disableTailwindColors: true,
disableTailwindFonts: true,
disableTailwindFontSizes: true,
}),
],
resolve: {
alias: {
'@scripts': '/resources/js',
'@styles': '/resources/css',
'@fonts': '/resources/fonts',
'@images': '/resources/images',
},
},
server: {
watch: {
include: ['resources/images/**/*.svg'],
},
},
})
Production Server is: http://dev.sw-verl.de/ (I have to mention this unfortunately hosted on Ionos standard hosting).
npn run build is building without any errors.
Would be happy if soneone could pinpoint me in the right direction if something is wrong with my approach or it’s an server issue.
Thanks,
Sev