Critical Error After Site Name Change

I changed the name on a DevKinsta install (‘rename sites’ from ‘Sites’ panel and ‘Site Name’ under individual site pane). Everything updated correctly - name, URL, folder, etc. and the site pulls up fine and lets me log in. However, it won’t let me get to the dashboard and shows “There has been a critical error on this website…”

( ! ) Fatal error: Uncaught TypeError: ftp_fput(): Argument #1 ($ftp) must be of type resource, null given in /www/kinsta/public/wp-site-template/wp-admin/includes/class-wp-filesystem-ftpext.php on line 212
( ! ) TypeError: ftp_fput(): Argument #1 ($ftp) must be of type resource, null given in /www/kinsta/public/wp-site-template/wp-admin/includes/class-wp-filesystem-ftpext.php on line 212

Hello Sarah (@cyclonepress ):wave: , Welcome to DevKinsta community!

Thank you for reaching us out! :slight_smile:
Renaming the site should work just fine and should not affect the site admin dashboard (that shows a critical error, as you reported). I also have tried to rename 1 of my local sites in DevKinsta, and it worked just fine - and I was able to login to the WP Admin dashboard after I renamed it.

So this might be something else that’s causing the critical error on your local site, when accessing the WP admin dashboard (e.g.: old WordPress version that’s no longer compatible to run on PHP 8.0 or PHP 8.1).
To check further, could you please check the local site in question (on your “DevKinsta → Sites” page) and let us know what’s the WordPress version as well as the PHP version used by that site?

Also, please kindly provide us the error log file of your local site in question, in case there’s anything else (related to the Critical error) has been logged in there. Depends on the O/S used on your computer, but usually it can be found under the ~/DevKinsta/logs/ sub-folder, and the name of the file will be something like this: yoursitename_error.log .


WordPress 6.1.1
PHP 8.0

wp-site-template_error.log (8.2 KB)

I just realized I didn’t post the full error:

( ! ) Fatal error: Uncaught TypeError: ftp_fput(): Argument #1 ($ftp) must be of type resource, null given in /www/kinsta/public/wp-site-template/wp-admin/includes/class-wp-filesystem-ftpext.php on line 212
( ! ) TypeError: ftp_fput(): Argument #1 ($ftp) must be of type resource, null given in /www/kinsta/public/wp-site-template/wp-admin/includes/class-wp-filesystem-ftpext.php on line 212
Call Stack

Time Memory Function Location

1 0.0021 392936 {main}( ) …/index.php**:0
2 0.0037 429320 require_once( '/www/kinsta/public/wp-site-template/wp-admin/admin.php ) …/index.php
3 2.1954 113075624 do_action( $hook_name = ‘admin_init’ ) …/admin.php
4 2.1954 113076000 WP_Hook->do_action( $args = [0 => ‘’] ) …/plugin.php
5 2.1954 113076000 WP_Hook->apply_filters( $value = ‘’, $args = [0 => ‘’] ) …/class-wp-hook.php
6 2.2465 113481592 Astra_Sites_Importer_Log->has_file_read_write( ‘’ ) …/class-wp-hook.php
7 2.2491 113482192 WP_Filesystem_FTPext->put_contents( $file = ‘/www/kinsta/public/wp-site-template/wp-content/uploads/astra-sites/index.html’, $contents = ‘’, $mode = ??? ) …/class-astra-sites-importer-log.php
8 2.2496 113483632 ftp_fput( $ftp = NULL, $remote_filename = ‘/www/kinsta/public/wp-site-template/wp-content/uploads/astra-sites/index.html’, $stream = resource(2524) of type (stream), $mode = 2 ) …/class-wp-filesystem-ftpext.php

Thank you for your reply Sarah! :slight_smile:

Based on that error.log file you provided, it could be due to that plugin: astra-pro-sites .
Still unsure if that plugin would work on PHP 8.0 or not , but could you please try to set the PHP version for this local wp-site-template site to PHP 7.4 perhaps (from your DevKinsta → click that wp-site-template site , then click the Wrench icon - to open that Site configurations, and click on the PHP Version 8.0 and change to 7.4 ) ?

If it’s still not working even with PHP 7.4, may want to try to disable the astra-pro-sites plugin - and see if that would help. Please let me know your operating system as well?


OK so switching to 7.4 let me in the backend (thanks for the note about the wrench icon… that’s so hidden I’m not sure I’ve ever noticed that panel. I’m on Mac OSX Monterey). There were a ton more errors like the one I shared above, but there was also a note about missing file permissions and a request to add the below to wp-config.

define( ‘FS_METHOD’, ‘direct’ );

I added this and the errors disappeared, along with a bunch of requests to re-register the paid (Astra) plugins. I wonder if some sort of security issue was tied to that. I’m updating/reactivating now, then I’ll try switching back to 8.0 and see what happens.

1 Like

OK updating back to PHP 8.0 worked fine. Thanks for your help on that!

One thing I have noticed is that the https certificate is no longer working on this site. I toggled it off and then back on in DevKinsta and it’s still giving me the insecure warning.

Screen Shot 2023-02-27 at 12.22.58 AM

You’re most welcome! That’s great to hear the above method worked fine for you Sarah! :clap:
So most likely previously any of your plugin(s) might not fully compatible to run on PHP 8.0 (and had to switch to PHP 7.4 first, and you could then work on it/re-registered/updated plugin(s), and was then able to switch back to PHP 8.0).

About the insecure warning, since you mentioned Mac OSX Monterey , I remember about similar issue with the SSL cert on Mac OS (on Ventura though) - and am wondering if this solution here may also work to solve the case you’re experiencing perhaps.


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