Cannot access WordPress Appearance → Editor

Why it happened:

Since WordPress back end editor runs on top of WordPress itself, if you cause a critical Error within the PHP files, that will cause error on the backend Admin Panel as well. At that point you will no longer be able to access the backend editor until you fix the error.

What is that Error:

When you see PHP reporting an error like the following:

Fatal error: Cannot redeclare some_function_name()

This means that the above mentioned function was already declared before and then you created a function with the same name again. PHP cannot have the same function name more than once within the same scope.

In your case, you probably created a new theme function named twentyseventeen_widget_tag_cloud_args() which already existed in the functions.php file of Twenty Seventeen theme.

How to solve it:

Now you cannot access PHP from WordPress backend (the reason is explained above), but you can still access the PHP files from FTP (ask your web host) or from CPanel (or any such control panel) provided by your web hosting company.

Once you can access the PHP files by other means, you need to remove (or rename) that newly created function named twentyseventeen_widget_tag_cloud_args() and save the file.

Note: As already suggested by Mat, it’s not a good practice to edit PHP files from WordPress backend editor. Instead use FTP (preferably FTPS or SFTP) or an alternate file editing method from your web server.