Skrypt „naprawiający” WordPress’a

Napisałem niewielki skrypt, który po wgraniu do katalogu głównego z instalacją Waszego WordPress’a pozwoli na łatwą zmianę hasła do panelu administracyjnego oraz na łatwą zmianę adresu URL bloga w bazie danych WordPress’a.

Wiem, że w sieci jest wiele opisów jak wykonać tego typu zmiany. Sam w przypadku zmiany adresu url korzystałem z tej instrukcji. Jednak skrypt, który napisałem pozwala zmienić te ustawienia za pomocą kilku kliknięć bez znajomości obsługi bazy danych. Nie jest nawet wymagany bezpoiśredni dostęp do bazy danych.

Mam nadzieję, że skrypt się komuś przyda 🙂 Oczywiście jeżeli znajdziesz jakiś błąd w działaniu skryptu lub uważasz, że mogła by znaleźć się w nim jeszcze jakaś funkcja – daj mi znać. Postaram się poprawić błędy i dodać takie funkcje do skryptu.

Skrypt dostępny do pobrania tu: download

Instruckja obsługi jest bardzo prosta:

  1. Pobrać archiwum zip, które znajduje się pod adresem: kaplonski.pl/files/repairer.zip
  2. Rozpakować archiwum i wgrać pliki class.repeater.php oraz repeater.php do katalogu głównego z WordPress’em – tam gdzie znajduje się plik wp-config.php
  3. Uruchomić skrypt w przeglądarce wchodząc na stronę http://adres_twojej_strony/repairer.php
  4. Podać nowe hasło dla jakiegoś użytkownika lub nowy adres url.

UWAGA!!! Po zmianie hasła czy adresu url, jak skrypt nie jest już potrzebny proszę KONIECZNIE usunąć go z katalogu strony. Umożliwia on dostęp do bazy danych strony niepowołanym osobom więc pozostawienie go na serwerze może być niebezpieczne.

Zostawić komentarz ?

21 Komentarze.

  1. Hello, this plugin (visitors counter) its very nice. Especially becuase it does not create thousands of rows of data in database.
    I have one question, is it possible to create a counter for THIS DAY (for today)?
    you can email me on my upper mail.
    YOu can even give me some advice, I will try to do it by my self.
    thx in advance
    Mitja

    • Hello, thanks for Your opinion. Ofcourse it is possible to make also „day” counter but it require to make some changes in code of plugin. I thing that I can do it in about one week (I hope). Please give me info if You thing that will be enought only current day stats or also to save stats from other days.

  2. Thank you mate. Really appreciate your work.
    If there is a possibility it would be good to have counter for:
    – now
    – today
    – this week
    – total

    But I would only like to have that database only holds full numbers of visits (no other data, which would make database larger every time).
    The same way like you have it now (when you always do +1) – So only one number if in database.

    I only want counter, no other stuff.
    big thx.
    Mtija

  3. Any progress?
    Just curious if you are doing any code.
    I would like to learn php as well, currently Iam programming in C# (for last 3 years).

    How did you learn it? Do you have any webiste to help me learn php?

    bye

    • Hello,

      I just commit new version of my plugin into wordpress repository. It should work with daily and weekly counter but I have no time to test it well 🙂
      If You will have any problem with new version, please turn it off and again turn it on in wp-admin – it should help 🙂
      I have no one site which I was learning php. It is simple language and there is many sites about it in internet.

  4. One more think, is it possible to EXCLUDE counting visits for the administrator? I as admin am there almost all the time, and it the counter now shows that Iam there in any given moment.
    I would like not to count me (all administrtors of the website).

    • It is another good idea but I need to have some time to make it. I will try do it ASAP but I don’t know exactly when it will be done 🙂

  5. Hi, just curious, is there any progress on the visitor counter plugin?

    best regards
    Mitja

    • hello, what You exactly mean? I post You some time ago that I make modifications which You ask for. In version 1.4 of my plugin You can enable daily and weekly counter and You also can disable counting od admin users. Is it not working correct for You?

  6. Ups, sorry, but I missed your plugin (now its the 1st time I hear you did an update). And here can I download 1.4 verison?

  7. There is no link to this plugin. Can you please privide it?
    thx in advance.

  8. I found files here: http://plugins.svn.wordpress.org/visits-counter/tags/1.4/
    but I dont see any option to enable TODAY`S and WEEKLY visitors. I still have only 2 options, now and total.

    In widgets aera, were I put it in the sidebar, there is no option either.
    Where are they? I can see that the code has been changed, but I cannot use these changes (like you on youtr webiste – here).

  9. I tried to disable and enable the plugin, but no help.

  10. Got it. I found options to set in Settings > General.
    ———-
    On more thing, I saw you added into „wp_vs_overall_counter” table into id 3 a number 14. Is this meant 14 days? 2 weeks?
    If I change it to 7 will this count for 7 days (a week)?

  11. I found out what means 14 – this is the week number.
    The only problem is now that the „timer” does NOT reset on 00:00. Not event for daily couning, and not event for weekly counting.
    Where in your code is specified this when to reset? I was looking into it, but didnt find anything.

  12. Or this is only up to my datetime setting (of wordpress and system)?

    • Yes, this number in db (e.g. 14) is week number. It will change automaticly to 15, 16 ….
      Weekly counter should be changed at 0:00 in every mondaty. Daily counter should be changed at 0:00 every day. It works fine at my site. I was check Your website and I think it was also reset now. You should check datetime settings on Your server. Maybe it is different that Your „home” time. I don’t know what else could be a reason of problem.

  13. I was up until 01.00 on Monday (this morning) and it still didn`t change. Does this only depends of the server time?
    But when I woke up at 8.00am the couters were reseted.

    As far as I know the server is located in my country, but I better ask them if this is true.

  14. But, thank you very much for your hard work. I really appreciate it. If you will need any windows application, you can ask me about it. 🙂

    bye

  15. Wielkie dzięki. Skrypt „uratował mi dupę”.

  16. Bardzo przydatny skrypt, kawał dobrej roboty!

Zostaw komentarz


Podpowiedź - możesz użyć tych HTML tagów i atrybutów:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

 
Korzystanie z Serwisu oznacza zgodę na wykorzystywanie plików cookie. Akceptuję