I installed wordpress locally with xamp on my pc (Macbook pro Apple silicon 2021), yesterday I could normaly install a plugin (starter template) but today if I try to install a plugin it says at first "update failed" on the button where it should usually say activate but when I reload the page it is installed and I can click on activate but it does not activate it. When trying to install I am getting the following message:
Installation failed: Hello World!{"success":true,"data":{"install":"plugin","slug":"jetpack","pluginName":"Jetpack – WP Security, Backup, Speed, & Growth","debug":["Downloading installation package from https:\/\/downloads.wordpress.org\/plugin\/jetpack.11.0.zip…","The authenticity of jetpack.11.0.zip could not be verified as no signature was found.","Unpacking the package…","Installing the plugin…","Plugin installed successfully."],"activateUrl":"http:\/\/localhost\/wordpress\/wp-admin\/plugins.php?_wpnonce=0ec70b4569&action=activate&plugin=jetpack\/jetpack.php"}}
And when I try to publish a page I am getting that the response is not a valid json.
I tried to do sudo chmod 777 to the htdocs page but it did not help, I set in my wp-config the following:
/** In order to install plugins */
define( 'FS_METHOD', 'direct' );
This had worked yesterday but not today anymore, I am using the latest version of Xamp and wordpress
Can you elaborate if there have been any changes since this stopped working?
Try moving the JetPack plugin to its parent directory and then re-downloading the free version from the WordPress Plugin Directory.
If that doesn't work, here are a few things you could try:
Check URLs in Settings » General, for most websites, the WordPress Address (URL) and Site Address (URL) fields should be the same.
Reset Permalinks, go to Settings » Permalinks and update without making any changes.
Rename your .htaccess to .htaccess-bk then change the .htaccess file to default as shown here.
Download the free plugin Health Check & Troubleshooting and check for errors (especially ones involving REST API).
Try switching to the WordPress default Theme and see if the problem occurs when updating, if the issue is fixed, it could be an issue with the theme you are using. If you are using the default theme in WordPress 6, you could try activating the Twenty Twenty-Two theme and try updating plugins again.
Try deactivating plugins one by one to see if there is a culprit causing this error... Test after deactivating one by one ensuring that you re-activate the previous one and test updates in between.
You could also check your wp-config.php file, and change the following:
define( 'WP_DEBUG', false );
to
define('WP_DEBUG', true);
Do any further errors show up? Let me know if they do.
I guess the only further information I could add here is to check for inconsistencies with the file permissions. With WordPress, directories tend to be 755 and files 644. See the below post for further reading in regards to this:
Correct file permissions for WordPress
For reasons as to why you shouldn't use:
define( 'FS_METHOD', 'direct' );
See the below link:
What security concerns should I have when setting FS_METHOD to "direct" in wp-config?
Related
i have a problem with one of my wordpress websites. Every time i want to open to home url it automatically redirects me to the /wp-login.php with this strange url:
https://example.at/wp-login.php?redirect_to=https%3A%2F%2Fexample.at%2F&reauth=1
Also i can't use the "Back to example.at" Link under the login window.
Site & Home URL are set correctly, also there is no redirection set in any plugin or in the .htacces. Also all safety plugins are disabled.
Does anyone already had this strange problem?
Make sure that your website plugins works good.
For first disable all plugins or rename /wp-content/plugins folder then check your website. If problem solves rename back the plugins folder and try to rename plugins directories step by step and find problematic plugin.
Try change the main theme and recheck problem, look at your main theme function.php file content, if you see the obfuscated codes, delete this codes and recheck website.
Delete wp-include, wp-admin folders and reupload from offical wordpress.org last version archive,
Install Wordfence av plugin and scan your website files. maybe you have injected codes.
check your .htaccess file, try to reset it.
Check your server and wordpress requirements. Change the php version to 7.2.
Disable your cahce plugins (if you have).
Try to debug your website with this steps.
I'm having problem enable caching with WP Super Cache. Currently running Wordpress freshly installed for testing. The only thing I've done is installed WP Super Cache and removed Akismet and Hello Dolly.
The plugin activates, but I can't enable caching in settings. When I reload the settings page it says "Caching Off" again.
For some reason, it also keeps creating copies of wp-cache-config.php in wp-content, and copies of wp-config.php in the webroot. All these copies gets named a random number like 8734852931.php
A message in WP first says it has added
define( 'WP_CACHE', true );
to wp-config.php, but it didn't. When I add it manually (above require_once(ABSPATH . 'wp-settings.php');) i get another message:
Warning! WP Super Cache caching was broken but has been fixed! The script advanced-cache.php could not load wp-cache-phase1.php.
The file /home/X/public_html/wp-content/advanced-cache.php has been recreated and WPCACHEHOME fixed in your wp-config.php. Reload to hide this message.
Reloading doesn't hide it and WPCACHEHOME is not put into wp-config.php. If I manually add
define('WPCACHEHOME', '/home/X/public_html/wp-content/plugins/wp-super-cache/');
to wp-config.php the message goes away, but cache still wont turn on.
Apache error log says nothing of interest, even on debug level.
I've tried to do it all over again with chmod 777 on the entire webroot with the same results, so I don't think it's permissions.
I've also tried different PHP (running 5.6 now) and Wordpress versions.
There are people running exactly the same server setup as me, who has WP Super Cache running on their sites.
Anyone with an idea on what might be the issue here?
This is solved. It was
"disable_functions = rename"
that caused this issue.
Hi I am a newbie in WP and I got the following error:
This happens when I tried to update plugins, go to plugin page, update wordpress etc.
Why this is happening?
My php is 7.0.
There can be many reasons for such problems, here are possible cases you can check:
Are you running in Localhost environment? Sometimes, when WordPress is not able to connect to wordpress.org server. It can show errors.
Some plugin/themes in your site in not compatible with php7, make sure all your plugins are compatible.
You can try disabling all plugins and switching to the default theme to see if the problem still persists.
Downgrade to lower PHP version ( PHP 5.6 ), to see if the problem still there.
Try updating WordPress manually- Delete all files in your website except wp-contents folder and wp-config file.
Get a fresh copy of deleted files from wordpress.org
I am logged into a WordPress site backend as an administrator. The theme was built using the Sage Starter Theme.
During development there was no issue with adding plugins or upgrading the core, but since moving to production, there is no "Add New" button for plugins and the upgrade message reads "WordPress 4.3 is available! Please notify the site administrator."
I tried manually changing the db_version field of the wp_options table to force a database upgrade. This didn't work.
I tried disabling all plugins and changing to the twentyten theme - this did not work.
Checked all permissions on the server - no joy.
How can I resolve this issue?
The latest Sage Starter theme uses a .env file to set up environments via the phpdotenv library. It lives in a directory above the public HTML web root of the WordPress installation.
If you changed the line WP_ENV=development to WP_ENV=production in the .env file when the site went live, then it's likely this is the source of the issue.
If you look at the actual configuration for the production environment in /config/environments/production.php, you see the following:
define('DISALLOW_FILE_MODS', true); // this disables all file modifications including updates and update notifications
This tells WordPress not to allow manual addition of plugins or allow core updates. You can simply edit this to be:
define('DISALLOW_FILE_MODS', false); // allow file modifications including updates and update notifications
After you've modified the core or added plugins, you can simply change it back if you don't want admins to have this power, but a better solution would be to install a capability manager plugin and define an admin role with slightly lower privileges.
For anyone else with this problem, there is another line that you may have to find in your wp-config or functions file and change to false:
define('DISALLOW_FILE_EDIT', true);
I can't find the line define('DISALLOW_FILE_MODS', true); or define('DISALLOW_FILE_MODS', false); in my wp-config.php file.
My solution: I just added the line define('DISALLOW_FILE_MODS', false); in wp-config.php file after define('DB_HOST', 'localhost'); /* or anywhere */
That SOLVED my problem and I was able to update again core, theme and plugins.
In my case, the problem was caused by the removed permissions for my "administrators" user group.
More exactly the update_core were missing in wp_options table option_name = %wp-table-prefix%_wp_user_roles
The easiest way to fix it is to install PublishPress Capabilities plugin and you can find it in the "Admin" tab. First, click black X (negate all) and save and then you can enable it.
The same maybe for plugins and themes updates.
I have installed a fresh copy of wordpress on a windows XAMPP server. I configured the wp-config file and ran the install script. All is ok, and I am able to view my new wordpress site and login to admin area.
However - when I go to Appearance->themes - the current theme is set to TwentyTwelve and in the lower section the "Available Themes" does not show ANY themes.
After this I copied a new theme to the themes folder (which was working on a WP install on my test server at work) and that doesn't show up either.
Can anyone tell me how to make the other default theme (TwentyEleven) and more importantly my own built themes, appear as being available?
Thanks :)
Try to change the theme folder permissions to 777
style.css is very important for a theme.
You should check either style.css exists or not.
If No, try install wordpress again.
If Yes, then there might be the issue of File Permissions.
Set file permissions from below.
http://codex.wordpress.org/Changing_File_Permissions