Pushing local to staging Kinsta : WordPress critical error

Hello,
First, sorry for my english, I’m a french speaker.

After building my website on local with DevKinsta, I tried to push it on staging in my Kinsta account.

Transfer is ok but when I open the website on staging, WordPress get a critical error.

First, I have disabled all pluging by changing name folder on SFTP. WordPress finally works but obviously broken without plugins.

But, some plugins have disappear in Extensions menu : Elementor & Elementor Pro.
The folder is also broken on SFTP :

Command: cd “elementor”
Error: Directory /www/mywebsite_517/public/wp-content/plugins/elementor: permission denied
Error: Failed to retrieve directory listing

And when I try to activate any plugin >>> Critical error on WordPress.

Can you help me please ?

(I already tried to pushing again my local to staging, but same issue : critical error)

Thanks you

Hello @Zeusii :wave: Welcome to DevKinsta community!

I’ve checked your staging site on our server and noticed another error (related to Jetpack plugin). I got the following error even when I tried with WP CLI from SSH on your staging site:

PHP Warning: require(/www/unjourencaledonie_517/public/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-videopress/src/class-initializer.php): Failed to open stream: Permission denied in /www/unjourencaledonie_517/public/wp-content/plugins/jetpack/vendor/jetpack-autoloader/class-php-autoloader.php on line 90
Warning: require(/www/unjourencaledonie_517/public/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-videopress/src/class-initializer.php): Failed to open stream: Permission denied in /www/unjourencaledonie_517/public/wp-content/plugins/jetpack/vendor/jetpack-autoloader/class-php-autoloader.php on line 90
PHP Fatal error: Uncaught Error: Failed opening required ‘/www/unjourencaledonie_517/public/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-videopress/src/class-initializer.php’ (include_path=‘.:/usr/share/php’) in /www/unjourencaledonie_517/public/wp-content/plugins/jetpack/vendor/jetpack-autoloader/class-php-autoloader.php:90

I then checked that sub-folder under your
“~/public/wp-content/plugins/jetpack/jetpack_vendor/automattic” subfolder, and noticed several sub-folders there were setup with 0004/d------r-- permission.

I then ran this command line via SSH on your staging’s sub-folder to fix the folders/files permission:

find . -type d -exec chmod 755 {} \; && find . -type f  -exec chmod 644 {} \;

now I’m no longer seeing any critical error when I run the same WP CLI or access your staging site URL.

So I suspect, there might be folders/files permission issue on your local computer (with some other files). In this case, please be sure to set them with the correct permission (folders with 0755 and files with 0644).

I’m not sure what operating system you’re using on your end, but if you’re on Linux or Mac O/S, you can open terminal and go to your ~/DevKinsta/public/yourlocalsitename and execute that command line:

find . -type d -exec chmod 755 {} \; && find . -type f -exec chmod 644 {} \;

Once done, you may want to push your local site to your Staging site once again and re-check if there’s no longer critical error.

Cheers,
Agus

Thanks you for your help ! I appreciate it :wink:

Unfortunately, I can’t manage to execute the command in terminal. I have a zsh permission denied. I check the folder and I have all the permissions on it … Very strange.
I tried to open all permissions (read/write) by using the finder, I don’t know if something changes but now I have a new issue : DK0065 error when I want to upload again my website. I tried to upload only main file (without content folder) … same error frome DevKinsta.

So my question is : can you execute yourself your command on my entirely staging folder ? Not only for the plugin.

Thanks you for your help.
I’m so sorry for my poor skill about this. I’m using DevKinsta for 6 months, creating my new website and I can’t manage to publish it properly, I’m so confusing.

Hello @Zeusii,
I’ve reset the permission on your staging site for your entire home folder.

Let us know if you need any further support.

Regards,
Alessandro

Hello Allessandro, everything is working perfectly ! Thanks you so much for your help :wink:

Glad to hear that @Zeusii !
I will mark this thread as closed now :smiley:

Cheers,
Agus

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.