How to recover emails that Accidentally deleted emails permanently using Python script, imap-tools module - imap-tools

I used imap-tools module to copy emails to another folder and then delete emails on the current folder.
I accidentally copy and delete two different list of emails. The emails did not move to trash folder but deleted permanently. Is there any way that I can recover those emails?

Related

I can't complete the update of WordPress from the admin panel

Overview
I can't update my WordPress from the admin panel=>Update (the admin panel is locked in the middle).
WordPress itself is trying to update to "WordPress 5.9".
What I tried
Stop all plugins and update WordPress.
Set the permissions of "upgrade" and "plugins" directories under the WordPress directory and wp-content to 777 or 704, and stop all plugins.
To enable debug.log, I added the following to wp-config.php and tried to update, but no debug.log appears under wp-content.
Added statement=>define('WP_DEBUG_LOG', true);
Update with browser cache cleared
Checked PHP execution time in wp-config.php=>set_time_limit(600) and it was specified as 10 minutes, so it seems to be fine.
What I want to ask you
Even if I do all of the above things in parallel, I can't update WordPress (the process stops in the middle).
Can you tell me if there is any other reason why WordPress can't be updated? Thank you for your time.
I would just do a manual update at that point.
Download the current/or version you need and once you’ve downloaded it, extract the zip file to your computer. Then, open the folder that contains all of the WordPress files and delete the following items:
The wp-config-sample.php file.
The wp-config.php file (you might not see this file – just make sure to delete it if it’s there). The wp-content folder.
Once you’ve deleted those items, upload the remaining files/folders to your server via FTP. When prompted about duplicate files by your FTP client, tell it to overwrite all files:

How to find posts and pages in the backup

I have backup of my site on my pc and i'm trying to find posts and pages (my site content) but i can't find them, in what folder in backup should i search in please?
Posts and Pages aren't stored as files in WordPress, they are stored in your database. If you open up your wp-config.php, you'll see what database tables/prefix your installation is using.
Depending on how you backed up your website, there may be a file (perhaps a .sql file, or .tar.gz file, or some proprietary file) somewhere, often in the base directory, or in the wp-content or wp-content/uploads directory. If you don't have a file like that somewhere, or just backed up the files straight from your hosting account (such as cPanel), you'll need to go back in there and download a backup of your database as well.
Also note that pages, posts, and other custom post types are stored in the wp_posts table, all together. If your site relies on custom fields, those will be stored in your wp_postmeta table.

Git doesn't detect changes in WordPress

Me and my friend started developing a web site using a WordPress theme. I uploaded the source code on git hub and started doing changes on the website using the admin dashboard. But whenever git status command is entered in the bash, It says working directory is clean and no changes. Any idea why this is happening?
git tracks changes of the source code (or, generally, any files) which lie in the folder where the repository is located. But when you change something in WordPress or other CMS, these changes are typically recorded into database, not filesystem. Only files uploaded by users typically go to the file system, but not configuration settings (like titles and posts).

Wordpress installation infected

my problem is, that my wordpress installation was infected. So I downloaded the whole files and checked them by V-scan. It seems to be okay, but google-pages find an deeper problem.
here you can see the page: best-around.de
Now I want change all files via ftp. (no new installation) ... I extracted the new version of wordpress.
And now my question is, which data i need from the old installation (like wp-config.php). So that I can changes only the files.
Thanks and kind regards
Armin
It really depends on what you are trying to keep.
wp-config.php stores your database connection details and a few other settings.
wp-content is the directory that stores all of your uploads and plugins. Essentially all of your uploaded content.
The file and folder shown above are what you would typically want to keep. However, the infection could very well have spread to the php files in there too - so keep that mind!
The alternative method is listed below:
A good idea would be to follow the manual upgrade process instead
Get the latest WordPress zip (or tar.gz) file.
Unpack the zip file that you downloaded.
Deactivate plugins.
Delete the old wp-includes and wp-admin directories on your web host (through your FTP or shell access).
Using FTP or your shell access, upload the new wp-includes and wp-admin directories to your web host, in place of the previously deleted directories.
Upload the individual files from the new wp-content folder to your existing wp-content folder, overwriting existing files. Do NOT delete your existing wp-content folder. Do NOT delete any files or folders in your existing wp-content directory (except for the one being overwritten by new files).
Upload all new loose files from the root directory of the new version to your existing wordpress root directory.
If you get stuck here - have a look at https://codex.wordpress.org/Upgrading_WordPress_Extended

Wp admin page isn't accessible

When I go to http://www.cowrubber.com/wp-admin
the url changes to
http://cowrubber.com/wp-admin/cowrubber.com/wp-login.php?redirect_to=http%3A%2F%2Fcowrubber.com%2Fwp-admin%2F&reauth=1
Somehow I just can't access the admin page to login.
I have copied the site from an test site on the localhost. And changed the url's in the database to the new ones but due to unknown reasons I just can't access the admin site.
When you move a wordpress to a differently named domain, it is not ehough to just search and replace in the database, because wordpress (sadly) store a lot of things in serveral table in serialized format.
So what you need to do is, in your case:
Create a backup of your local database.
Create a backup of your current production database and file.
Delete all the files from your production server, and drop all table from production database.
Copy all files to your production server from localhost.
Import the local database to production database.
Do not open the production wordpress site in the browser!
Go to here, and download the newest script: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
Unzip it into a wp_replace directory.
Upload this directory to your document root, where wp-conifg.php is.
Go to the http://example.com/wp_replace/
Fill the From and To fields, without http:// and without trailing slash. Eg: somethinog.localhost to 'example.com`
Live run it. You will see, how many records changed in wich tables.
Delete this wp_replace directory. If you leave it, add a htpasswd to it otherwise anybody can crash your db.
Go to the WP admin, navigate to Options -> Permalinks. Push save.
Now you can use your new domin :)

Resources