Deploy via FTP all guide

ok, I am trying to deploy on web but with no luck.
I can just work via FTP and in a subfolder, not in the root.

ran build:production then created on FTP a subfolder /av2021/
.env:

        DB_NAME=hosting_db_name
        DB_USER=hosting_db_user
        DB_PASSWORD=hosting_db_pwd

    # Optionally, you can use a data source name (DSN)
    # When using a DSN, you can remove the DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST variables
    # DATABASE_URL='mysql://database_user:database_password@database_host:database_port/database_name'

    # Optional variables
    DB_HOST='127.0.0.1'
    DB_PREFIX='mypreifx_'

    WP_ENV='development'
    #WP_ENV='staging'
    WP_HOME='https://atravisio.com/av2021/'
    WP_SITEURL="https://atravisio.com/av2021/wp/"
    WP_DEBUG_LOG='https://atravisio.com/av2021/debug.log'
    WP_DEBUG=true

    # Generate your keys here: https://roots.io/salts.html
....

then I have moved the files in the subfolders with .env and dist as well, but also with all the rest of them

  1. something were not good as when I tried to access https://atravisio.com/av2021/ I was redirected to
    https://atravisio.com/av2021/WP_HOME/wp/wp-install.php as if no WP_HOME url variable where loaded

  2. overrode it by going to https://atravisio.com/av2021/wp/wp-install.php and.could manage to install WP even the CSS was broken

  3. now, no matter I change the settings, I keep receiving 404 error…
    3.1 manually overrode DB options


    3.2 changed the location of index.php file and moved in /av2021/ (changed the inner path to the blog header too require __DIR__ . 'web/wp/wp-blog-header.php'; no luck
    3.3 restored the index position inside /web/ and updated application.php to have the root in av2021/ no luck

so I am seeking help here :frowning:
is there any guide or is there some nice guy willing to help me?

UPDATES:

fixing and making a bit of tweaking I managed to have access to admin section, but my Sage theme is not loaded, while it seems it’s looking for

Are you deploying (via FTP, shared/restricted hosting?) only a Sage theme (9 or 10?) or a whole Bedrock site?

via FTP, shared/restricted hosting a bedrock + sage theme.

also wanted to customize path and folders, as I don’t want to use /web standard

at the moment it seems I finally could manage to upload:

/web/
  | app
     | plugins, mu-pluings, theme, etc
  | wp
/config
/vendor
.env

and with this structure, it seems I can at least have a working backend and theme.
BUT

on the frontend I can see some kind of css in home page BUT template logic is not kept.
My front-page.php is seen as such via backend:

but the correct template is not loaded on frontend side.
same for other pages, which are unreachable error 404

is there some httaccess mods to be carried on?

RewriteEngine on
RewriteCond %{HTTP_HOST} ^atravisio.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.atravisio.com$
#RewriteCond %{REQUEST_URI} !extravagance/
#RewriteRule (.*) /extravagance/$1 [L]

RewriteCond %{REQUEST_URI} !web/
RewriteRule (.*) /web/$1 [L]

# Sage
<FilesMatch ".+\.(blade\.php)$">
    <IfModule mod_authz_core.c>
        # Apache 2.4
        Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
        # Apache 2.2
        Order deny,allow
        Deny from all
    </IfModule>
</FilesMatch>

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php72” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php72___lsphp .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

MOST OF ALL: What if I am on a server without the chance to edit Virtualhost file?

This topic was automatically closed after 42 days. New replies are no longer allowed.