Wordpress installation infected - wordpress

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

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:

Moving backed up Wordpress from subdirectory to root

I have a question regarding moving a backup from http://websitename/subdirectory.com to http://websitename.com.
What is the best approach to do this?
I have the backup from the subdirectory on my pc and currently on the website root there is a clean Wordpress installation.
There are alot of pictures, the Avada theme there and other media files.
If I just copy the files via FTP will it crash or will the URLs be broken afterwards?
This will take a couple of steps to but here is the basic steps required.
Download the database from phpmyadmin (or however you access your sites database).
You should have a .sql file now.
You need to do a search and replace action on the full url for the site in the subfolder to the new location where it will live at the root. Your goal here is to get the subfolder out of every url on your site. Example, your current url is this: https://example.com/subfolder/ - you will need it to be https://example.com/
Save that version of your database as a new file called import.sql.
To be safe, I would create a new database, database user, and database password and import this new version into it. Store these values database name, database user, database password and database hostname. You will need them later.
Plugins
Download all of the plugins from /subfolder/wp-content/plugins/ folder and upload those to the /wp-content/plugins/ folder in your root level fresh install of wordpress.
Themes
Upload your theme to the /wp-content/themes/ folder from your /subfolder/wp-content/themes/ folder.
Uploads
Download everything in the /subfolder/wp-content/uploads/ folder and upload to the /wp-content/uploads/ folder.
Update your wp-config.php
That database that you created and imported your database in Step 1 here, you'll need to update your wp-config.php with the new database name, database user, database password and database host.
The last step here is to upload the wp-config.php to the root file and this will point the site to the new database.
Login to wp-admin
Login to wordpress at the root example.com/wp-admin/. Go to Permalinks settings and save them. Sometimes you have to do that to flush the permalinks and make subpages work.
Test your site
Go the frontend of your site and test everything to make sure that everything is in working order.

WP not displaying the latest version update button for wordpress

Hello i am not getting the Update Now button at wordpress admin.
My current worpdress version is 4.8.3
so how can i solve upgrade my wordpress 4.8.3 to latest version 4.9
you can do one thing in wordpress folder i.e. you can do all plugins deactivated after you refresh the dashboard page from backend admin side then you can get the Update Button.
Otherwise you can upgrade the version by manually,
Follow the steps,
Upgrading WordPress Core Manually
First create a full backup of your website. This is very important
in case you make a mistake.
Download the newest WordPress ZIP file from wordpress.org.
Unzip the file into a directory on your local machine or in a separate directory on your website.
Deactivate all of the plugins on your WordPress site.
Go to your website root directory and delete your ‘wp-includes’ and ‘wp-admin’ directories. You can do this via sFTP or via SSH.
Upload (or copy over) the new wp-includes and wp-admin directories from the new version of WordPress you unzipped to your website root directory to replace the directories you just deleted.
Don’t delete your wp-content directory or any of the files in that directory. Copy over the files from the wp-content directory in the new version of WordPress to your existing wp-content directory. You will overwrite any existing files with the same name. All of your other files in wp-content will remain in place.
Copy all files from the root (‘/’) directory of the new version of WordPress that you unzipped into your website root directory (or the root directory of your WordPress installation). You will overwrite any existing files and new files will also be copied across. Your wp-config.php file will not be affected because WordPress is never distributed with a wp-config.php file.
Examine the wp-config-sample.php which is distributed with WordPress to see if any new settings have been added that you may want to use or modify.
If you are upgrading manually after a failed auto-update, remove the .maintenance file from your WordPress root directory. This will remove the ‘failed update’ message from your site.
Visit your main WordPress admin page at /wp-admin/ where you may be asked to sign-in again. You may also have to upgrade your database and will be prompted if this is needed. If you can’t sign-in, try clearing your cookies.
Re-enable your plugins which you disabled earlier.
Clear your browser cache to ensure you can see all changes. If you are using a front-end cache like ‘varnish’ you should also clear that to ensure that your customers can see the newest changes on your site.
Your upgrade is now complete and you should be running the newest version of WordPress.
Hopefully, you get the solution.

Wordpress Domain Mapping, which folder(s) to backup?

It took me a while to get domain mapping working on wordpress. I set it up using debian. I was just wondering which folders I should backup in the event of a server re-install where I can just drag in the saved folders and domain mapping should be working again. Unless I have to go through the steps all over again.
You should backup all user generated files like plugins, themes, and upload files which are all under in the wp-content folder. Also, take care of the wp-config.php which includes the db connect setting of your site and the .htaccess file which contains the server config for your site.

How to set up git for wordpress theme development

I am setting up 10 new local wordpress sites. I have 10 folders all named like this:
"name-of-site.com"
Inside each is a simple file structure:
briefing files
html
wordpress
I want to set up a repository on git hub for the wp-content file but I can't find a way to create an alias. Surely the end result will be 10 different repos all called "wp-content"
How can I set up a separate repo for each wp-content folder and name it "name-of-site.com"
Is this glaringly obvious and I am being really stupid???
Why not have the top level folted, that is "name_of_site.com" be the repository, and in that folder, you can create a .gitignore file to ignore the other directories you don't want, that is, the html and briefing files (if I understand your layout correctly). That way, you're simply tracking the Wordpress content. You can even move it up a level so that only the briefing files and the HTML are in separate directories and the WP content is in the "name_of_site.com" directory.
Edit:
After your comments, I think you could do it this way:
Create repos for each site you have and put the wp-content of those sites in the .gitignore file
Create one repo for wp-content, which contains all your themes. Organize them according to your needs.
Write a simple shell script that pulls the latest theme into your site's folder from the repo in the previous step. That way, every time you update your theme, you can go to your chosen site and just synch up with the latest pushed version.
Does that make sense?

Resources