joi, 17 februarie 2011

All New Phawville

All New Phawville


How to Fix a C4Parana Hack

Posted: 16 Feb 2011 10:08 PM PST

How to Fix a C4Parana Hack. Believe it or not, this site was hacked twice last year. The first one was simply a matter of deleting my administrative login and hence I was not able to login. If this happened to you, you can recover your hacked wordpress login by following the steps I outlined in another blog post. That was last November 2010. But after a month (December), it got hacked again by a Turkish hacker it seems which I am going to call a C4Parana hack.

I don’t know what a C4Parana is but what the hack did was 1) redirect my homepage to “http://maresanat.nl/media/C4Parana/$1″, 2) messed up my WP permalinks settings and 3) hacked my WP login like in the previous hack.

As I said, this happened in December and it has been 2 months since then so I’ll try my best to remember the exact steps to fix this hack. There might be some extra details I did back then but rest assured the steps below would suffice for you to fix the C4Parana hack. Another note though, there might be variations of this hack so please check against the description of the hack above if we were hacked the same way. If not, then follow the instructions with a grain of salt.

Step by step instructions on how to fix a C4Parana hack:

  1. Fix your .htaccess file. The redirect of the homepage is done by hacking the .htaccess file. Fix the file if you know how or simply delete it. We’ll create one (or WordPress will…) later. This fixes issue #1.
  2. Recover your WP login. I already have a blog post on this. Please check => recover your hacked wordpress login. This fixes issue #3.
  3. Fix your permalinks settings. Once you are able to login back into the WP dashboard, you should fix your permalinks settings. Just restore it to what you had before.

It’s really not that hard! Just follow the instructions above and you should be fine. You would do well if you keep in mind the following things as well:

  • Always upgrade to the latest stable WP version. Doing so will reduce the security vulnerabilities that WP have.
  • Make sure that your .htaccess file and wp-config.php file is not writable and accessible to the outside world. Only you (or any admin) should have access to these files.
  • Backup your files and database regularly. If all else fails, you can simply restore your backup if you get hacked.

That’s it. If you have any more questions or suggestions, please comment below.

How to Migrate a WP Installation from One Server to Another via Cpanel

Posted: 16 Feb 2011 08:39 AM PST

How to Migrate a WP Installation from One Server to Another via Cpanel. This post would serve as an announcement as well as a “How To”. I recently moved from one hosting service to another to consolidate a part of my domains in 1 of my hosting servers and to reduce costs. It’s never bad to save a bit even if it is just a few dollars :) .

For this tutorial, I am assuming you a know a thing or two about making backups(database and file) via CPanel and about FTP. If not, then I suggest you go learn them first, they are not that hard. If you are all set, then here is the step by step instructions to migrate a WordPress site from one server to another via CPanel:

  1. Backup the database. Now, there are a number of ways to do this but I prefer to do it via PHPMyAdmin. Backup your database by logging into PHPMyAdmin and exporting the database into a .gz file. If you are unsure how to do this, follow the official WP how to backup your database instructions.
  2. Backup your WP files. This can be done via the file manager. Select the root folder containing your site and click ‘compress’ from the clickable options above.
  3. Create a new database on your destination server. To make things just a bit easier, you may opt to name the database the same as the database you just backed-up. This way, you don’t have to update much later in the wp-config.php file.
  4. Import your backed-up database into the new database. Remember step #1? Well, just import the file(database backup) into the new database via PHPMyAdmin.
  5. Add domain to Add-on domain list. Make sure to fix the folder structure as well.
  6. Restore backed-up WP files. Restore the files via the file manager into the new folder just created in step #5.
  7. Update wp-config.php in new server. Update the database name, username and password.
  8. Update DNS of domain via registrar. Get the new DNS of your new destination server and update them via your current domain registrar.
  9. Wait. Nameserver propagation usually takes a few days so just sit back and relax.

The steps outlined above involves some downtime since we would have to wait for the nameserver propagation to finish which usually takes several days. If downtime is an issue, you can modify the steps above by adding these steps after step 6:

  1. Allow your old server to access the new database in the new server. You can allow this by going to Remote MySQL on the new server and adding the domain or IP address of your old server.
  2. Change your wp-config.php in the old site to point to the database on the new site. So, instead of accessing stale data, your site can access update information while waiting for the nameserver propagation to finish. The only downside is this could be a bit slow sometimes.

So the these are the steps to migrate a WP installation from one server to another. If you have any questions, feel free to comment/ask below.

Niciun comentariu:

Trimiteți un comentariu