Wp admin page isn't accessible - wordpress

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 :)

Related

Updating a WordPress site and database from Localhost to third-party host using FTP

Following this tutorial, https://medium.com/pen-bold-kiln-press/making-a-wordpress-website-live-from-localhost-198026ccd1c0 I've:
1.) Export localhost database from phpmyadmin
2.) Upload localhost files to live site through FTP
3.) Create a new MySQL database for the new site
4.) Import the localhost database to the live database
5.) Change the site URL and home in the database
6.) Configure wp.config on the live site
I am used to making webpages without Wordpress (custom html + css) and then just uploading the files to public.html....
My question is: If/when I make changes to the site on localhost, do I have to export the database and create a new MySQL database on the webhost each time or can I simply upload the wordpress files to publichtml each time to see my changes.
Do I only need to export the database once, on the initial push live?
(I make alot of changes usually)
If you change only theme file html+css or PHP to change view or print something, so not. You need to upload only changed files, without database.
If you make changes thru admin panel, like install plugins or change some option on a site then you need to update DB.
Also if you create some PHP code that change database like create something( new DB tables, change info inside tables, etc).

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.

wordpress website transfer from one machine to another

I installed wamp and wordpress locally. My friend also installed wamp and wordpress locally and started working on a website. I want him to send me what he finished so I can continue working on it. So he sent me his www folder inside wamp installation folder and I paste it inside my www folder. But when I open the website in browser it is empty (default one with Hello word). What should he send me, so I can continue working on the website?
If it's a wordpress website, it's not as easy as copy-paste; but it's not too difficult.
After they have given you all the physical files, your friend should
1) export their database (the name starts with wp_) using phpMyAdmin, and you should
2) import it with phpMyAdmin [note: if you want to overwrite your wordpress database, do this: 2a) as a backup, export your database with phpMyAdmin; and 2b) select all tables in your database and 'drop' them. Now the database is empty and you can import your friend's inside it.]
When this is done, you should
3) use phpMyAdmin to edit the first two entries in the table wp_options, inserting the proper path to your local website; then you should
4) assign to this database the username-password combination present in the wp-config.php file, in the main folder of wordpress. You do this with phpMyAdmin. Alternatively, you can edit wp-config.php so that it carries the proper password-username combination for your system.
IF there is nothing of interest in your friend's database (as posts, pages, themes or plugins settings that you need etc) then you can skip steps 1,2 and 3.
This should do it. :)
The content of your WordPress installation is stored in a mySQL database, not on the file system. The files your friend sent you is WordPress itself and doesn't change anything contentwise.
Your friend needs to export (dump) his database to a SQL file. This can be done with a tool like PhpMyAdmin or mySQL Workbench. Take this file and import (overwrite) your local database with it. Better make a backup of your database before!

Need help moving Wordpress Multisite from local host to my web hosting server

I have encountered some dificulties moving my wordpress multisite from localhost to my webhosting server.I would appreciate if someone can post a tutorial how to do this step by step.I modified my wp-config and changed urls in posts table(guid column) to fit the domain name, but still not working.I may miss something.
Thanks in advance.Have a nice day.
I've seen a lot of these issues and successfully fixed it by doing some Google search. Sometime it's really hard to find solution to the specific problem you are having, but there is always an answer.
First i would like to tell you that you can make this process easier by using some plugins like: backupbuddy or Duplicator.
But if you want to learn the steps to do that manually, here are the details:
I'm assuming that you already have a local Wordpress site running with full access and you also have a web hosting plan with access to their control panel.
You also need FTP client to transfer files over to your server, i use FileZilla it's free and comes with all functionality you need for this or any other uploading purpose.
1: Export Wordpress database from phyMyAdmin, to do that go to http://localhost/phpmyadmin/ click on your wordpress database and now you will click on export from the menu. You will see custom option after you click export which gives more options, select all tables and use gzipped as preferred compression format. Now scroll down and press Go to download your wordpress database.
I'm doing the same thing while writing this so i don't make any mistake while explaining to you or anyone reading this.
2: Open the FTP client you have or download and install FileZilla, connect to your web hosting directory. Now the site uploading process starts, suppose you need the wordpress site to be on main url like example.com, in that case you will upload your wordpress files to public_html directory.
There are two windows within the ftp client the left one is mostly the local and right is remote, copy your wordpress files from local to remote which is your server.
3: It's now time to create MySql database on your online site.
Go to your web hosts control panel and in mysql databases create a new database, give it any name of your choice it doesn't matter.
Once the database is created scroll down to MySql users section and create brand new user for that database, next step is to setup privileges. Give that user all privileges.
4: Now import Wordpress database to your online site, in your control panel open phpmyadmin which is mostly under databases section, choose the database you created in step 3 now click on import tab, click choose file or browse and select the gzipped file you exported from your local site. Click import and your databases will be imported.
5: This is part where most of the people makes mistake, be careful doing this. In this step you will change the site URL to go online. In the database we just imported look for wp_options table (I'm assuming that you haven't changed your database prefix for security reasons yet) click wp_options table and click browse.
Look under option_name field, look for siteurl. Now click Edit button in the same lane.
Another windows appears at this point which shows you the current site url most probably http://localhost/something. Type in your website address here like: http://tech-diggers.com
Save once you enter the correct site. Do the same thing for Home under options_name field. Change the siteurl to your site address for home.
6: At this point if you visit your website it must be giving some error, that's because the last part is still pending. Go to your ftp client and on remote site edit wp-config.php file. Enter database name, user id and password save and upload back to the remote directory.
You can test the site now by going to your http://example.com/wp-admin
Finally you have your working Wordpress site online, now it's time to grab some useful resources for Wordpress: Best Web Hosting Service & Other Useful Resources for Bloggers

How to move Wordpress to another domain without the chance to make a proper backup first?

So my webhoster closed down, where I hosted my Wordpress blog. I was able to receive a zip file containing all my data. I now have a new webhoster and I extracted the zip file to its root directory.
Trying to open my website now gives me "Error establishing database connection". The web tells me it may be related to hardcoded urls in the Wordpress database, which I need to replace by the new url.
However the tutorials usually tell you to use the Wordpress interface to create a backup of my database first, which can then be edited in tools like phpmyadmin. I can not access the Wordpress interface anymore and so far did not manage to edit the database otherwise.
I tried placing a local copy of the blog in the "C:\xampp\htdocs" folder, hoping phpmyadmin would recognize the database and allow me to edit it. Not working, maybe I am doing something wrong?
Any ideas to revive my Wordpress blog?
Cheers
Okay I think I got it working. For people having the same issue:
I loaded the database locally by copying the *.myd, *.myi, *.frm files to a new folder in my local xampp installation (e.g. C:\xampp\mysql\data\myDatabase).
I then used phpmyadmin to export this database to a .sql file.
On my webserver I then installed a fresh wordpress blog. It might be enough to copy your existing wordpress stuff, without needing to do this step afterwards, not sure.
My webhost has phpmyadmin preinstalled, so I used that to delete the fresh wordpress databases and import the .sql file instead. Now everything is in place, but since I changed my domain I need to change the URL paths in the database.
I used this script (use it by placing it on your webserver in the wordpress root folder and calling it in the browser) to do a search&replace of my old url to the new url: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
After that I only had to manually fix the path to my header image that I had edited in the past in the theme's header.php file.
Phew. Thanks for your help f00644.

Resources