Error migrating the wordpress on developing - wordpress

I'm developing a WordPress page on local, now i need to migrate it to a server.
I did it before 2 or 3 times some time ago, i move the files to the new server, change the URL on the database entries and create the new database.
I had problems establishing problems to database cause a letter missing on the db_name. and i was getting the "connecting to database error". I fixed it, but now, when i load the page, navigator show me.
¡Ouch! Google Chrome cant establish a conection with the page
preview.mypage.com:8887.
I think about something is bad about :8887 because i work in basic php before...but don't know what's wrong.

Problem on wp-options
Site URL and Home entries don't actualize their values then i did the replace on the .sql with a text editor.
Wish this help other people.

Related

Server not showing the right file on webpage

I am testing/learning how to send info from a Gravity form to a test file on my website.
I am using a testfile.txt that I added in var/www/ which is the location of the Wordpress directory.
The command I am running updates that file and I am able to see its contents when i go to the domain: mywebsite.com/testfile.txt.
The first time I run the Gravity form, I can see the changes on the webpage. However, after updating its contents to something else, the webpage does not update despite reloading it.
To troubleshoot this, I SSH'd into the server to see if the file was being updated and indeed it was...
So, basically, the file is being updated on the server but not on my GoDaddy domain... Has anybody encountered a problem like this? And if so does anyone have a solution?
I am no Expert in this field, Beginner to be honest. When I was learning Python flask a framework for building website, I had similar issue. Maybe the problem is that, when you visit your website it loads from the cache. To solve that press 'ctrl + F5', it forces a cache refresh, and will guarantee that IF the content is changed, you will get the new content. Again, I am beginner myself.
As #Sadman said, whenever I don't see my content getting updated I do a hard refresh or delete the cookies and cache manually. Either one of these solved my problem. To make a hard refresh press ctrl+shift+r or ctrl+f5 or shift+f5 on windows. On MAC this is cmd+R. I hope this helps!

WordPress Duplicate issue

I just duplicated my WordPress website hosting to cloud server but it is not working correct. What can problem be?
http://185.73.39.210/
I checked db connection again and again. Db name, user, password are not incorrect.
Looking at the source of that page, I see <?, which means your new server doesn't recognise the short form of the PHP opening tag. Either find that piece of code and change it to <?php, or (if you can change your PHP settings), enable short tags.

My site got hacked and he left behind an encrypted filed

This morning I logged onto my website and shockingly I found that it just spit out error messages and some kind of upload form was displayed. A form that basically uploads a file onto my server.
I logged into my server and had a look at the access log. It seems he accessed the function file of my wordpress theme, fully deleted the original and created an upload form out of it.
With that upload form he then uploaded the following file.
Edit: I had to copy the code to hastebin, it was too big to be posted here.
http://hastebin.com/itedinefiz.php
He named the file web-info.php. I did not run the file because I am afraid that it might do some harmful things to my site.
Could anyone tell me what this file does?
Anyway, I have restored the functions.php file of my wordpress theme and deleted that web-info.php file form the server and now it seems that the website is running again.
Oh and my guess he gained access to my website because my login credentials were very easy... very stupid of me :(
After doing a bit research this what I came up with.
The malicious file that I have posted above, was encoded using eval(gzinflate(base64_decode));
Thanks to http://ddecode.com/phpdecoder/ I was able to decoded it, here is the raw PHP file that the hacker left behind:
http://pastebin.com/fAEQn2j7
I ran the file on my local machine, holy crap! It's a full on rootkit. It has massive interface that covers pretty much anything to take over the entire server. It seems to let you browser the entire files on the server, run sql code, run php code, brutforce options, network option and so on.
I think the safest it to cancel the entire VPS that I am renting from Bluehost, a normal wordpress deinstallation won't do any good.

Serious issue after deployment to server - random text on the page

I have migrated some website updates from staging to live, but now, when I view the live site, I get the following random text on the page:
This only appears after I log on, so I can get the logon page to appear.
I re uploaded the latest dlls from dev, to staging and then live, and now staging has the same issue. However, staging was previously working, and dev doesn't have the issue!
���I�%&/m�{J�J��t��$ؐ#�������iG#)���eVe]f#�흼��{����{����;�N'���?\fdl��J�ɞ!���?~|?"��Ey�')=��y6�����h���i�f���ӏ���o�'g�UU�O'/����i�\Vm:��j�/��6��ԸhӢI����X���w��i���I5�N�y�l�ϳEQ^?��'�z�-���ӫ������U��J��)~�?J�������Ѥ̦oI��]�P�"�/��v[����W�~���m`N�rvk���Mqz3���wV�vR��{_��IW�2����������,KO�eS��יy�/����m^+E eB��c*�j�w��,�Vu���Q����a�2��*����E�]�-򺮨/%��j�j�(��Y���{�ʖ�lR���n���,��ć�����2�����uC� ԡO��w}V|W�L�d��\0��>��m���ւh�����=z��4���GV,ӏ�~��Ve1elǏ�uzU���g�;;�{�Y�lW���)Jz���]���a�w�>.�!a/�0�=���uB���4�������Q���pki��s}I?_����e��*�X�Y=J���uq�FH49J��ʹ.V�0��N����z� ) ���4���jJsi���by�����ͧk���?�&��U>I������/�ĩ��"��fMK욶5 ���N�G�<�P1�lR�[��'��I��y�T���X3k �L����h����A��a=�۬(�����c����/*Oʂ��l�G�72�è���5Q�y�pG���1���?�g:ń�o�Ku�C��7b��#^�~�5��&����<'��g����EV���2�<�e%�j �މ� x1#��yA���i���$/�+�8;�Ș��B�v�Ga"S�^F� ����>&�8|���tk������݇;�w���>�1(hd������K��!;���IE�s_��[�ޝ��݇���=����ٲ��e��������΃ =��5/����ͼ��,�����Y�$�ݲM�I����Ox�-����4$����r���$�g�)���N4^, R����,��1��"3K�rF��ni�������_�U��ʛuپ�i��s�&���=ܻi����bY4�SV����A���ClY�y��2��H���� #����l�D#�� :�k��]�KKV�4k��SB������7���n���j6J�N���L:J?����r"��)�/��O���z+����l�;,�|9{S�,V9�p�v�w�Ż�!�n>����̵x����.�v��P��-Ϋ-m�>m������7��<�3���n�>9� f�f��߯ n>��[�
OK, issue was due to me taking another database offline (even though this database is obsolete and not included in any connection strings.
Going to open a new question for that issue

Links continue to point to live server - Drupal Live to localhost

I have inherited a Drupal 6 site to maintain.
I am new to Drupal so there is an element of learning as I go.
I have encountered a strange issue after attempting to set up a test site on my local machine.
All my links on my local site continue to point to the live server. So all menus, login buttons, etc. all point towards the live site.
Steps I have taken:
checked settings.php to ensure that $base_url is set to "http://localhost:456"
checked settings.php to ensure that MySQL settings are correct
Taken an SQL dump of the entire local database and searched for any references to live site URL
deleted all the local cache data from database
Checked various blocks to ensure that there was no hard coding of links
Disabled language support as that does use separate URLS for each language
I am at a total loss as to where to go from here.
I can navigate through the site locally by replacing the URL in the address bar to point to the local site, and I have even managed to change the local theme so I can see which version of the site I'm on. The fact that I could do this means that the database is set up correctly.
Totally stumped as to where to go from here. Any takers?
The problem was that in the 'variable' table there was an entry with the URL for default language pointing to live site. There is a 'language' table which holds the URLS for each language e.g. eng.example.com for english and ru.example.com for russian. I had changed the urls here to point to local server, but it seems there is also an entry in the variable table which needed to be changed.
In case anybody runs into this problem and wants to change it, you need to change the metadata for the entry as well where S22 represents a string of 22 characters, you need to change it to the length of the string that you are entering, youll see what I mean when you look in the table!
Also, you need to clear your cache after making any change.
In your local server, go to your site directory->site->default and open your settings.php file
look for the base url and comment out that line it should be around line 144
The only thing left is you need to a search for the live site url in your complete code base. See if any module is changing the base url using the code. Though I am not sure how it can be done using code.
However instead of replacing the url you can edit the hosts file and add an entry like
127.0.0.1 livesite.com
If you are using Linux the location of the file is /etc/hosts
I had this problem. I moved the entire site from the remote to the local server to work on, but whenever I loaded the site it went to the live site. I believe the problem was the .htpaccess file. I updated all the core Drupal files, but as the .htpaccess file was hidden I didn't notice it was still there.
Note that even after I removed it, it wasn't until I opened a different site on the local server and then went back that the path worked correctly.

Resources