I would like to change the theme file through the Wordpress Admin Panel, in menu Appearance > Theme Editor, but I've got the message:
Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over FTP.
Everything was working correctly before I've made some changes in the file and upload it through the FTP back to the server. I am able to change every other file in Theme Editor, but this one. The rights are the same as in other files I am able to change, the owner and group are the same too. It looks that everything should work, but this and only this one file I have updated via FTP I am not able to change through the Theme Editor of Wordpress Admin Panel.
Any idea what could be possibly wrong? What I have done wrong? Please help me somebody, in the most of the time I am on the "safe" network, and the server FTP is not accessible from my computer.
Thank you.
Check Theme Permission
One of the first things you got to check the theme files and folder permissions.
If you are running on shared hosting then mostly it would be alright. However, if using VPS or Cloud then you got to ensure the same user owns theme files as web server (Nginx or Apache HTTP) running.
Modify File Permissions with chmod
FYR :- https://www.linode.com/docs/tools-reference/tools/modify-file-permissions-with-chmod/
Check Security Plugins
Are you using any security plugins? Do you have the option to check their logs to see how exactly your request is being treated?
Alternatively, you can quickly disable the security plugin and verify if that works.
I have finally solved the problem. There were two things with I have mislead my question.
The first one was that I wrote "Everything was working correctly before I've made some changes in the file and upload it through the FTP" and after that I wrote it again in the comment of the answer - I was so sure that I have tried the same file before, but I have not, it definitely was another one, I am sorry.
And the second was that I did not write specific file name. The file was includes/_wp_utils.php. Somebody would maybe notice that this is the biggest file in that directory. And that was the problem. I do not know why - maybe it was too big for server processing or something else (120KB), but I noticed it later, and I have tried to split the file to a few smaller files and I have included them into the includes/_wp_utils.php with the command include_once __DIR__ . '/_wp_utils/_nth_part_of_original_wp_utils.php';.
Thank you #G.D Udara Lahiru Sampath, I absolutely liked your answer. It was useful and very important to check.
My site got hacked and at every first line of php file i have line:
<?php $knitglx = '<%G]y6d]281Ld]245]K2 ... $knitglx=$fmfqhx-1; ?><?php (it is very long). Since i am using wordpress there are millions of files and it is impossible to open 1 by 1 and delete this line. Is there a way to delete them all at once?
I read something about some sed functions but i do not know how to use it and after some discussion i know that will not solve my problem so now i am looking a way how to scan and remove viruse from my files. Any help would be okay.
If your site got hacked you REALLY should not try to clean the source code they injected!. It is very likely that you will forget something and you may spread malware or whatever to the visitors of your WordPress site. Also try to figure out why you got hacked and fix the hole.
Make sure to delete all files from the server and change all your passwords (FTP, WordPress, etc. etc.).
Here is what you can do:
1) Contact your provider and ask them to setup the latest clean backup
2) Setup your own latest clean backup
3) If you really have no backup (which is very bad) do the following:
Make a fresh installation of WordPress.
download your wp-content folder and check this for any malicious code
download your database and check for any malicious code
place the clean code / database into the WordPress installation
Simple deleting the first line of each file is most probably not enough. However there are solutions to this:
Batch file to delete first 3 lines of a text file
Delete certain lines in a txt file via a batch file
Note: With an IDE like Netbeans or IntelliJ you can do a search / replace on a huge number of PHP files. This might also help if step three is the only option.
The third possibility is not good because it means a lot of work ... good luck!
I clicked on the 'Update WordPress' link in the admin dashboard of my WordPress site, and I am getting this error:
"The file 'wp-config.php' already exists. If you need to reset any of the
configuration items in this file, please delete it first. You may try installing now."
When I try to click the "installing now" link, it seems that WordPress is installing fresh. I want to keep all of the content of my WordPress installation.
I have tried to change the name of the wp-config.php file but that didn't do anything.
Is just a browser cache.
On first URL load, you are redirected from domain.ext to domain.ext/wp-admin/setup-config.php
If you are on Chrome, just open the developers console, go to "Network" tab. Reload the page and right click anywhere in the console, and hit "Clear browser cache".
Now refresh again and you will see your website
I ran into this same issue while I was transferring a site. The issue ended up being with the .htaccess file. I fixed it by resetting my permalinks. There may be other causes to this issue but this worked for me:
Click on General => Permalinks
Click Save Changes (to reset permalinks)
Try to display the website first on the incognito tab. If it works correctly, clear the browser cache.
Once the page refresh has been completed, the website will appear.
You can use the following shortcuts to clear the browser cache.
Windows: Ctrl + F5
Mac OS: CMD + Shift + R
This usually happens when you use an old version of Wordpress files or old database, and you use partly new files of Wordpress.
All you need to do is to delete all WP files and install a fresh Wordpress (new files unzipped from a new version of Wordpress) and use an empty database.
If you're planning to migrate or move from another website, you should use the export/import function built in wordpress.
he file wp-config.php already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.
Answer:- Please Clear Your browser's cache.
Did I miss the party?
Today I have a problem like what you experienced 5 years ago. The solution is: Remove all caching plugins (Cloudflare, Jetpack, Litespeed).
Maybe you could try to delete 'wp-config.php' file, or take a backup of this file in different folder and then try again.
If you are using bluehost and did not do the one click install :
I solved this problem by deleting the default error pages 404.php 500.php etc...
I do not know why exactly this was causing this issue... Sorry for the sloppy answer but tried clearing cache and recreating the .htaccess file it didn't work.
I removed the added spaces that the Wordpress's own web 'easy installer' created in the wp-config.php file to help me out.
Guess the Wordpress's own wp-config.php ?checker? isn't compatible with Wordpress's own installer. Wow.
Once the added spaces were removed, site comes up fine. I simply modeled the spacing that is in the wp-config-sample.php file.
Because you just installed wp.
Just hit ctrl+F5 done!!!
More likely it is cache issue and this error comes when we try to install one Wordpress inside of another sub folder of the cpanel in the same Wordpress installation and it will be mostly resolved when you try to check it in the private window or another browser
For me it was file permission set to 666 changing it to 664 worked.
If someone is still for a solution.
This happened to me on an existing site while trying to update.
the problem was following line in wp-config.php near the end.
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-admin/setup-config.php');
Removing this fixed the problem.
Hope this helps.
RESOLVED: I had the same problem. post hack situation on other account, shared hosting and server NUKED. Luckily I had the backup files from one of the WP plugins but the main page didnt load, I could only go to 404 and from there to other pages but not main page, the error was wp-config eists...install...blah blah blah.....so I tried everything, multiple re-installs, changed the wp_prefix as per previous install on the fresh install and nothing helped, even ordered paid support from the backup plugin developer as I was sure that it fooked because I had Opencart also installed there but the backup was intended for WP only, my web developer also did something, perhaps removed the OC bits from DB, but thank god i managed to resolve it on my own(and justhost),. so I contacted the justhost for the SECOND TIME and they told me that the account is on VARNISH i.e. some sort of automated cache limit, so I told them to take it off and they wanted to know what have I done to reduce the LOAD to the server, so I told this and that and two seconds later everything loaded perfectly. took me about 20 hours to get main page loading, plus probably it will take 10 hours for fine tuning of the site. anyway if you contact jour host make sure you ask them if they are not blocking cahce as the first time I got in contact they couldnt help me.
I also meet with same error and Mr Pierre R is right its just a cache. Just clear your cache or check in private window. All fine.
if someone have still this error..
goto->admin->setup.php (delete this file error will be solve)
hope this will help.
I have been asked to move a silverlight site from one host to another. I have been told that this is easy, but its not working. I was given a zip of all the files, and the database and instructions on adding a couple of mime types. We created teh db/user as per the config file.
The original site is still live, so that's good. However, all we get on the new site is 'forbidden' at every level except the root which shows (an incomplete) list.
We are 90% sure the db is set up correctly and the mime types too.
We notice that the config file is down inside www/mysite and is called _config.php - is this ok?
I am guessing that we have missed something very obvious. Any ideas please?
It's a newby suggestion, but maybe you forgot to reset the file permissions? Try sudo chmod 700
If that doesn't solve the issue, then please give the complete error.
I got the same problem after publish my Silverlight application. In my case, there was not set default document on web.config, or you can just config in IIS.
In the process of moving a Magento shop to a new server.
Have copied clean copy of files for Magento 1.5.1, then copied the app/media/shin folders to overwrite the clean ones.
All seems ok, except I am getting PDO permission denied, despite the details in local.xml being 100% correct.
I have wiped the cache folders.
Any ideas?
Sorted, I must have missed something, but wiping the lot and starting over seemed to fix it.
Thanks,
What home page is returning?
Have you changes values in database?
Check this query.
SELECT * FROM core_config_data WHERE path = 'web/unsecure/base_url' OR path = 'web/secure/base_url';
Are you sure you didn't left old information in a local.bak.xml for example ? Magento reads every xml file in /app/etc