WordPress will not delete plugins or install any new themes or plugins - wordpress

I have installed WordPress and the Admin console is working. However any plugin I try to delete will stay no matter what as well as the themes. Any time I try to install a theme I get "Update Failed". If I delete the plugins from within my File Manager in cPanel, my plugins still remain in the admin console of WordPress. My permissions are set to 7-5-5 in general for WordPress. I have tried installing WordPress in a different directory and that does not work as well. I am installing this with Softaculous located in my cPanel.

Sounds like you might have some serious server-side/database related issues going on. Generally speaking, if you are in cPanel, or have FTP access you can go ahead and delete the plugins you want to from the /wp-content/plugins folder. Upon doing so this will 100% remove all the dependencies from the respective plugin(s) you're looking to remove.
If you go back into the WP plugin dashboard a fatal error will be thrown by those plugins since they no longer have the core files needed to run, and will automatically de-activate.
Another thing you can do is look inside the database, a simple SQL query will pull up your current active plugins, which you can then manipulate and remove from the database with another SQL query, or by using PHPMYADMIN or whatever other database management utility to have w/ your cPanel dashboard.
Example of the query:
SELECT * FROM wp_options WHERE option_name = 'active_plugins'
There's numerous resources out there which will help you 'hack' your way into the database and extract/remove the information you no longer need for your WP environment. Here's an example of one that does so via SQL queries:
https://perishablepress.com/activate-wordpress-plugin-database/

Related

problem mooving woocommerce to another domain

I have a woocommerce website installed and work normally , I want to change the theme without make changes on the website so all still ( products , pages, ...etc) .
I want to copy the same website into another domain to do changes without stop my first website .
this what i have do :
1- copy all files from the old to new website.
2- import database frm the old .
3- past into the new domain all files
4- import the tables of the old database to the new database
5- change the wp-config to work with the new database
6- change the domain into table : wp_options
and i launch the new domain : the first page is ok without errors
but when i enter to preview product i have error that page dosen't exist , and all other pages the same error . can any one help me ??? any ideas ?
When moving a WordPress site a few things to make it easier.
Manually, zip up uploads/plugins/theme or if you have some crazy thing going on wp-content. Generally, nothing else needs to be moved. (this excludes things like robots.txt etc you may have to move)
After importing the DB you need to run a search and replace to swap out the domain. It is used in more places than you think.
Go to settings and re-save permalinks twice. - This fixes most issues with pages not loading/404.
There are plugins out there that make this easier.
Updraft - Don't need the paid version. Can setup new site then add files and import them.
All in One WP Migration - Haven't seen anything this doesn't move but can be slow and harder with large sites.
Plugins like All in One WP Migration or Duplicator can be helpful, but from time to time they may fail.
With AIOWM you must create a backup and a blank WP installation, install the plugin in this blank installation and import the backup. Beware that many features are paid.
With Duplicator you create a backup and an installer that you've to upload (via FTP) to the new host and there execute the installer.php script to recover the backup.
Both of them take care of the search&replace needs.
If you want to go manual, you have to copy all files via ftp, or if you've a Cpanel or similar you can upload a Zip file and then extract it via the panel (I guess you don't have the ssh access to the server).
Than you've to create a database dump via PhpMyAdmin and restore it in the new server, thank you've to change two option in the database: the site url, and the wordpress address url.
That should let you login to the website backend, but BEWARE you've to do the search and replace on your database.
To do so, easyly, you can use Better Search & Replace plugin (https://it.wordpress.org/plugins/better-search-replace/).
Guessing that http://old_domain.com is your old domain and https://new_domain.com is the new one, usually I go this way on S&R:
- Search for "old_domain.com" and replace with "new_domain.com"
- Search for "http://new_domain.com" and replace with "https://new_domain.com" if you have an active SSL certificate
Than go to Settings -> Permalink and save twice.
Everything should be fine now :)
Remember to clean every cache if you've one active.

How to know what plugins were installed in WordPress

I am working in a WordPress project that for some reason the plugins disappeared, the data still exits but neither the project owner or me know what plugins were installed. For example I knew contact form 7 was installed because it showed me [contact-form-7 id="424"] in the page, I installed it and I can see the plugin now
there are other plugins for user authentication, permissions, etc. But how could I know which were installed?
there are no plugins in the plugins page so I need to check in the db or anywhere else.
First of all, I would try and determine why all the plugins aren't showing up (perhaps the /wp-content/plugins/ folder got renamed? It's a common way to quickly disable all plugins for diagnostics)
Beyond that, if you go to your wp_options table, there is a an option called active_plugins that contains a serialized array of the active plugin files that looks like:
a:13:{i:0;s:29:"gravityforms/gravityforms.php";i:1;s:19:"akismet/akismet.php"; … }
It sounds like your database is fine, consider page content is unaffected, so this should suffice in getting you a list of active plugins, provided they haven't been registered as inactive due to the plugin files not being found - if so you'll probably want to dig through a database backup from when it was working (and if you have a "Full Backup" you may even be able to restore the plugin files from there)
Note: Serialized arrays can be a pain to read, you can either dump the unserialized value in your own script, or use an online tool like this or this to get a more readable format.

How do I keep WP db content synchronized in the filesystem?

I'm looking for an easy way to sync content that is in the Wordpress DB with the file system. Pages and Posts mostly, but any additional content would be great. I'm not looking to cover 100% of the DB content, just the most used configurations.
This is the Wordpress workflow I'm looking for:
Create a file in the filesystem, ie. /repo/posts/mypost.yml
Run a Wordpress command-line, ie. wp sync, which checks for sync status between my filesystem /repo/ and the content in the database.
Differing content from the db is exported and from the filesystem imported.
In case of conflict (double changes in both), ask for merge or whatever.
This is very common with the newer, file-based, CMSs, like Grav, Kirby, Jekyll, etc. but unfortunately, for many reasons, we're stuck with Wordpress.
That way we can use git and edit and version content in a much more robust way.
WordPress already has built-in version control in the database, called revisions. If you use different user accounts, WordPress will even lock pages that are being edited, preventing collisions.
Additionally, you can export the database to an .sql file and store it in your custom theme directory which you should manage with git. You only need to version control your custom theme directory, because all non-custom WordPress files already have version control. However, you can export the database every now and then to keep your git repository complete. Additionally you should ask your hosting provider to create daily backups.
This will give you full version control on everything (git for the theme and WordPress for the content). Developers will be able to take the git repository and rebuild the installation locally, to change the theme. Content can be edited remote in WP, with WP versioning and daily back-ups for security reasons.
Note that exporting your database to an sql file can be done by using a database manager like PHPmyAdmin or Adminer and using the export functionality or by using a WordPress plugin.

wordpress database not showing in PhpMyAdmin

I am new to wordpress and have bought udesign theme from themeforest. from my Plesk I have installed WP and then from the dashboard of WP tried to upload the theme, but failed. hence went directly to dedicated server and hosted on the root folder.
Theme started reflecting on the dashboard and I have started customization. Once site completes I need to move the site to production server. When I check PhpMyAdmin from the plesk, it shows there is no DB table. how do I copy/move the site without DB?
Can i manage site without PhpMyAdmin? like copying the entire assets to new server and it starts working automatically?
Please help me to find DB or Let me know how to work with the themes to make sure everything in right place.
Many Thanks,
Gururaj
If you’ve ever had the need to find the name of your WordPress database, then there’s an easy way to do that – simply look for it in your wp-config.php file located in the root folder of your WordPress install.
Accessing Your WP-Config.php File
If you are doing something where you need the name of your database, then I’m assuming you have access to your server.
Simply go to the main folder of your WordPress install and locate the file called wp-config.php.
Edit file and find name in:
define('db_name','your database here');

How to back up wordpress site to be restored after a clean installation

My Wordpress blog appears to have been hacked and now blogs do not save and any changes I make such as approving a comment do not have effect. I am trying to backup my website so as to uninstall wordpress and perform a clean re-instillation. I want to create a backup so that when i restore the website will appear with everything the same as before: posts, images, links, colors, comments, themes, pages, etc. I have already backed up the MySQL database successfully. How do i backup the rest of the site.
Please tell me how to backup the site and also how to restore the site.
Thanks
You need to backup both your database and your Wordpress installation. The main resource to use for this is the Wordpress site:
http://codex.wordpress.org/WordPress_Backups
If you have phpmyadmin installed you can do a database dump from ther. If you don't have this installed then use mysqldump.
Wordpress installation backup can be initiated through the following URL:
http://[yourwordpressurl]/wp-admin/export.php
That will contain "your posts, pages, comments, custom fields, categories, and tags".
These links should get you started:
http://www.geeksaresexy.net/2008/01/29/how-to-backup-and-restore-your-wordpress-blog/
http://www.siteground.com/tutorials/wordpress/wordpress_backup.htm
http://codex.wordpress.org/WordPress_Backups
Good idea to look at FAQ: My site was hacked « WordPress Codex and How to Completely Clean a Hacked Wordpress Install.
best thing to do is to manually copy the database, as wordpress restore has an upload limit on the built in restore function. so if you've been blogging for a while, this can be really bad.
mysqldump -u yourUsername -p yourDatabaseName > databaseName.sql
will create the file databaseName.sql this is a full clone of all your database info (all your posts & wordpress configs)
then you can restore later with
mysql -u yourUsername -p yourDatabaseName < databaseName.sql
I figured it out. One way to cleanly install a new version of Wordpress but not lose your website is the use the Wordpress export feature as mentioned by Jon.
http://codex.wordpress.org/Tools_Export_SubPanel
This exports your blog to an XML file that contains all content of your site: posts, comments, authors, pages, etc. However, images do not go with. However when importing this XML file there is an option to download and import the attachments automatically which can be done if the original site is still online. So what I did is export my XML file, upload it to a wordpress blog installed on a subdomain automatically getting the attachments, then export an XML file from the subdomain to import into the actual wordpress site. This way my attachments were simply moved around from site to subdomain back to site. This made it easy because I did not have to handle backing up my attachments manually.
So what I did was back up my theme, export my blog to XML, then delete wordpress and my database then reinstall it with a new database on both my site and a subdomain of my site.
Then I imported my XML file and put my theme in the themes folder of the subdomain. Then I exported an XML file of this subdomain copy of my site and imported it into my real site. This made my blog have all the content correct and the theme right but none of the links, plugins, or colors correct. I then had to customize wordpress through the panel to get it back to the look and feel it was. For this It was lucky I had a stored copy of the site to refer to.
This process was long because I actually had to rebuild my site twice, one for the subdomain and then again for the actual thing. But it fixed my problems.
You can simply use EverLive.net. No need to install any plugin. No need for shell access. With this service you can simply make your wordpress website backup to the cloud. One-click restore option is also available wheneven you need to restore.

Resources