Live website not updating/reflecting the changes

Hello.

I’m trying to make a couple of simple edits on a website originally built in 2019-2020. I’m a freelancer, not associated with the agency that built the website (the agency doesn’t exist anymore).

I’m not very experienced with Grav and I’m failing to get the live website to reflect the edit made in Grav.

What I’ve tried so far:

  • Updated Grav to the latest version - 1.7.43
  • Cleared the cache in the Grav admin.
  • Cleared the cache by deleting everything that was in the grav/cache folder on the server.

The majority of plugins are not updated:

Could this be causing the issue? If it’s not necessary, I’d rather not update at this time, due to risk of something breaking terribly.

Also, on the server, in the Grav folder, none of the files and folders were updated/edited since the website creation even tho new files have been added to Grav admin in the meantime:

Also, when I try to preview the website through Grav admin, the hosting company website is opened, instead of the website:

Any help or direction would be much appreciated!

Thanks so much in advance!

I would never recommend developing on or editing a live site. Give yourself some peace of mind and create a clone of the site in a safe environment in your local environment or on a server. Then you can try stuff without fear of breaking the working live site.

You only need a copy of Grav’s user folder to reproduce the site. The first thing to do is get a default core Grav site (out of the box) working in your sandbox development environment. Then you can replace the user folder with your copy.

If you see a white page when you first replace your user folder, then there’s a good chance it’s this permissions problem.

I’m guessing the problems you have described are due to an outdated theme (which may or may not have been fixed) and the Admin plugin’s own theme. Updating everything is recommended in any case.

Hmm I see, thank you so much. I’ll work on setting up the testing environment then.

But before I do, I’m interested if the following scenario could work:

  1. Create a backup of the existing website
  2. Edit the live website
  3. If something breaks and I can’t fix it quickly, I just roll-back (upload the backup) between my attempts to try stuff and fix the core issue that I’m facing.

The issue I’m facing with creating a clone site is that there’s a lot of tech used to build the website that I’m not familiar with and it would take quite some time for me to get a hang of it. Therefore, any possible alternative methods would work better in this scenario.

I was able to create a clone of a website and get it to work but I’m now facing issues with accessing Grav admin. The domain.com/admin doesn’t work.

I did not install the default (out of the box) Grav installation but rather just went with the already existing Grav installation.

Could this be the reason why I can’t access the admin?

I’ve read here that I should rename the domain folder inside of /user/ but there’s no user/env/ or user/domain.com/ folder inside of my Grav installation.

I’m not sure how you made your clone, but that is unlikely to matter. I also assume “doesn’t work” means you are seeing a 404 Not Found page??

I have two suggestions:

  • look for user/config/plugins/admin.yaml and see if it has set an alternate URL for admin like route: /anotherpath
  • remove any YAML files in user/accounts then load any page - when there are no users and the Admin plugin is installed and enabled, you will be redirected from any page to a form requiring you to set up an admin account.

Yes, but it depends because you haven’t described exactly how it isn’t working.

Grav requires a pretty minimal, simple, and flexible tech stack and there are quite a few options. It’s worth figuring it out and installing a default site.

Good luck!

@Zyklome,

To complement the comments from @hughbris

1.

I was able to create a clone of a website and get it to work but I’m now facing issues with accessing Grav admin.

According one of the images you’ve shared, the site is using plugins which might cause problems in Admin:

  • Admin Power Tools - last update Dec 2020
  • Core Service Manager - last update Dec 2020
  • Editor - last update Dec 2020 (requires Admin Power Tools + Core Service Manager)
  • Admin Addon User Manager - last update May 2021 (requires Admin Power Tools)
    According the creator of the plugin the plugin is no longer needed when using Grav 1.7.x

A comment from the lead developer of Grav on plugin Admin Power Tools:

BTW, it’s quite likely that all these errors stem from the “admin-power-tools” plugin which is a 3rd party plugin that has not been updated since 2019 and we dont’ recommend using as it messes with the core admin plugin.

Probably removing that plugin plus any of it’s associated plugins would solve your messages issue.

In response to that comment, a user responds:

it has worked, after disabling ‘Admin Power Tools’ and ‘Editor’

I have no idea if above plugins are causing issues on your site, but disabling these plugins and testing your site might be worth a try.

2.

I’ve read here that I should rename the domain folder inside of /user/ but there’s no user/env/ or user/domain.com/ folder inside of my Grav installation.

The default location for configs is /user/config. Folders /user/domain.com/config/ and /user/dev/domain.com/config do not need to exists. For further info, read the docs on Environment Configuration.

Some further notes:

  • Upgrading Grav to its latest version and not upgrading plugins might also cause issues.
  • Just to take into consideration: Updating/fixing/upgrading an existing production website is not quite the best playground to learn Grav and might not be in the best interest of the client…
1 Like

Thank you so much for helping me get to the bottom of this!

  • What I meant with ‘/admin doesn’t work’ is that I get the host’s 404 not found page (NOT Grav’s 404 not found).
  • alternate URL was not the issue, it’s set to ‘/admin’.
  • deleting YAML user account files did not help, I was not prompted to set up an admin account (because of 404 not found page).

And these are a couple of new things that I concluded along the way:

  • The original website is run on Nginx server but my testing env is set up on LiteSpeed. I have tried all the mentioned solutions from the 404 NOT FOUND troubleshooting guide and none of these helped. I tried these solutions BEFORE I figured out that the original server is run on Nginx instead of LiteSpeed/apache.
  • The Grav admin for the original (livewebsite.com) website is set on a subdomain of the hosting company (subdomain.hostingcompanywebsite.com/admin) and NOT on the livewebsite.com/admin. I could not find any clue or explanation on how this is done, neither in the Grav docs/forums, nor in the files on the server.

I’m kinda stuck now and not sure in what direction to go from here. Should I look further into understanding better the Nginx to LiteSpeed ‘conversion’ or something of that sort?

Once again, thank you so much!

All noted, thank you so much!

I’ll try these as soon as I get the testing env up and running fully, I’m currently stuck on trying to get the Grav Admin to work.

The only solution I see at the moment is to do the following:

  1. Download every single thing from the server on my PC (as a backup).
  2. Go ahead and update the theme and plugins and disable/delete the plugins that are not needed.
  3. If something terribly breaks, delete everything from the server and upload the backup.
  4. Repeat step #2 but this time with 1 less plugin updated/deleted until I figure out what is causing the website to break.
  5. Repeat this whole process until I get it right.

Would this actually work? I know it’s quite time-consuming but I’m kinda lost here.

@Zyklome,

  • Are there no errors/warnings inside /logs/grav.log, or /logs/*.log ?
  • Be sure to also copy all hidden files like .htaccess

I think I would prefer to start with a working site:

  • Backup the current production server. Be sure to copy hidden files.

  • Create a fresh install of latest Grav + Admin

    • Does site show up?
    • Does Admin run?
  • From backup, copy folders (if existent) /user/accounts/, /user/data/, /user/pages/ and other folders inside /user/ that may exist, to production server.
    Do NOT copy folders /user/config/, /user/plugins/, /user/themes/ yet.

    • Does site show up?
    • Does Admin run?
    • The site might not look pretty, because the theme and plugins are missing.
  • From backup, copy folder /user/themes/ and copy folder /user/config/themes/

    • In your backup, open file /user/config/system.yaml and get the value for theme.
      pages:
       theme: mytheme
      
    • On your production server, edit file /user/config/system.yaml and set value for theme.
    • Run $ bin/grav cache
    • Does the site show up?
    • Does Admin run?
  • Install plugins one-by-one using $ bin/gpm install pluginname and copy its config file /user/config/plugins/pluginname.yaml from the backup.
    Install in the following order: ‘page-as-data’, ‘git-sync’ and ‘tinymce-editor’
    After each plugin:

    • Does the site show up?
    • Does Admin run?

    Do NOT install default plugins that already exist on the production server inside /user/plugins/.

    I would skip for the time being:

    • Admin Power Tools
    • Core Service Manager
    • Editor
    • Admin Addon User Manager (do not install at all because it is deprecated)
  • Copy one-by-one config files /user/config/media.yaml, /user/config/system.yaml, /user/config/site.yaml and /user/config/plugins/email.yaml from your backup.

    • Does the site show up?
    • Does Admin run?
  • Finally, fix things I’ve forgotten or couldn’t know…

1 Like

@pamtbaau ,

There are a couple of errors in the grav.log. The last one is from 2021 - link to the error, or a picture of it.

In the meantime, I created a fresh install of the latest Grav + Admin but could NOT access the admin.

The strange thing is that the website loaded as if nothing had changed, which made me conclude that the core issue of why the website is not updating is because Gatsby doesn’t build the site anymore after edits. In other words, I could probably completely delete the grav folder and the website would still load without any issues.

Gatsby is one of the ‘tech that I’m not familiar with’ that I mentioned earlier. I don’t know if this means anything, but there’s a ‘gatsby’ folder in the root that is empty:

Screenshot 2023-10-22 212110

Do you think that outdated plugins/theme could cause Gatsby to stop building the site automatically?