'; echo '
Unfortunately your server cannot convert webp files in PHP without resorting to cloud conversion.
' . 'But do not despear! - You have options!
' . 'Of course, there is also the option of using another plugin altogether. ' . 'I can recommend Optimole. ' . 'If you want to try that out and want to support me in the process, ' . 'follow this link ' . '(it will give me a reward in case you decide to sign up).' . '
' . "Btw, don't worry, your images still works. The rewrite rules will not be saved until you click the " . '"Save settings" button.
'; //'(and you also have "Response on failure" set to "Original image", so they will work even if you click save)'; } else { echo 'The rewrite rules are not active yet. They will be activated the first time you click the "Save settings" button.
'; } //echo 'working converters:'; //print_r($workingConverters); //echo 'Before you do that, I suggest you find out which converters that works. Start from the top. Click "test" next to a converter to test it. Try also clicking the "configure" buttons
'; /* if (Paths::isWPContentDirMovedOutOfAbsPath()) { if (!Paths::canWriteHTAccessRulesHere($wpContentDir)) { echo 'Oh, one more thing. Unless you are going to put the rewrite rules into your configuration manually, ';
echo 'WebP Express would be needing to store the rewrite rules in a .htaccess file in your wp-content directory ';
echo '(we need to store them there rather than in your root, because you have moved your wp-content folder out of the Wordpress root). ';
echo 'Please adjust the file permissions of your wp-content dir. ';
if (Paths::isPluginDirMovedOutOfWpContent()) {
echo '
But that is not all. Besides moving your wp-content dir, you have also moved your plugin dir... ';
echo 'If you want WebP-Express to work on the images delivered by your plugins, you must also grant write access to your plugin dir (you can revoke the access after we have written the rules).
';
}
echo 'You can reload this page aftewards, and this message should be gone
Oh, one more thing. I can see that your plugin dir has been moved out of your wp-content folder. '; echo 'If you want WebP-Express to work on the images delivered by your plugins, you must grant write access to your '; echo 'plugin dir (you can revoke the access after we have written the rules, but beware that the plugin may need '; echo 'access rights again. Some of the options affects the .htaccess rules. And WebP Express also have to remove the rules if the plugin is disabled)'; } } if (Paths::isUploadDirMovedOutOfWPContentDir()) { if (!Paths::canWriteHTAccessRulesHere($uploadDir)) { echo '
Oh, one more thing. We also need to write rules to your uploads dir (because you have moved it). '; echo 'Please grant us write access to your '; if (FileHelper::fileExists($uploadDir . '/.htaccess')) { echo '.htaccess file in your upload dir'; } else { echo 'upload dir, so we can plant an .htaccess there'; } echo '. Your upload dir is: ' . $uploadDir . '. '; echo '- Or alternatively, you can leave it be and update the rules manually, whenever they need to be changed. '; } } } else { $firstWritable = Paths::returnFirstWritableHTAccessDir([$wpContentDir, $indexDir]); if ($firstWritable === false) { echo '
Oh, one more thing. Unless you are going to put the rewrite rules into your configuration manually, '; echo 'WebP Express would be needing to store the rewrite rules in a .htaccess file. '; echo 'However, your current file permissions does not allow that. '; echo 'WebP Express would prefer to put the rewrite rules into your wp-content folder, but '; echo 'will store them in your main .htaccess file if it can write to that, but not your wp-content. '; echo '(The preference for storing in wp-content is simply that it minimizes the risk of conflicts with rules from other plugins. '; echo 'deeper .htaccess files takes precedence). '; echo 'Anyway: Could you please adjust the file permissions of either your main .htaccess file or your wp-content dir?'; echo 'You can reload this page aftewards, and this message should be gone
'; } else { if ($firstWritable != $wpContentDir) { echo 'Oh, one more thing. Unless you are going to put the rewrite rules into your configuration manually, '; echo 'WebP Express would be needing to store the rewrite rules in a .htaccess file. '; echo 'Your current file permissions does allow us to store rules in your main .htaccess file. '; echo 'However, WebP Express would prefer to put the rewrite rules into your wp-content folder. '; echo 'Putting them there will minimize the risk of conflict with rules from other plugins, as '; echo 'deeper .htaccess files takes precedence. '; echo 'If you would like the .htaccess file to be stored in your wp-content folder, please adjust your file permissions. '; echo 'You can reload this page aftewards, and this message should be gone
'; } } if (Paths::isUploadDirMovedOutOfWPContentDir()) { if (!Paths::canWriteHTAccessRulesHere($uploadDir)) { echo 'Oh, one more thing. We also need to write rules to your uploads dir (because you have moved it). '; echo 'Please grant us write access to your '; if (FileHelper::fileExists($uploadDir . '/.htaccess')) { echo '.htaccess file in your upload dir'; } else { echo 'upload dir, so we can plant an .htaccess there'; } echo '. Your upload dir is: ' . $uploadDir . '. '; echo '- Or alternatively, you can leave it and update the rules manually, whenever they need to be changed. '; } } if (Paths::isPluginDirMovedOutOfAbsPath()) { if (!Paths::canWriteHTAccessRulesHere($pluginDir)) { echo '
Oh, one more thing. I see you have moved your plugins dir out of your root. '; echo 'If you want WebP-Express to work on the images delivered by your plugins, you must also grant write access '; echo 'to your '; if (FileHelper::fileExists($pluginDir . '/.htaccess')) { echo '.htaccess file in your plugin dir'; } else { echo 'plugin dir, so we can plant an .htaccess there'; } echo ' (you can revoke the access after we have written the rules).'; echo '
'; } } } */ /* if(Paths::canWriteHTAccessRulesHere($wpContentDir)) { if ($firstWritable === false) { echo 'Actually, WebP Express does not have permission to write to your main .htaccess either. Please fix. Preferably '; } $firstWritable = Paths::returnFirstWritableHTAccessDir([$indexDir, $homeDir]); if ($firstWritable === false) { echo 'Actually, WebP Express does not have permission to write to your main .htaccess either. Please fix. Preferably '; } if(Paths::canWriteHTAccessRulesHere($wpContentDir)) { echo 'WebP Express however does have rights to write to your main .htaccess. It will work too - probably. But to minimize risk of conflict with rules from other plugins, I recommended you to adjust the file permissions to allow us to write to a .htaccess file in your wp-content dir'; } echo ''; }*/ echo '';