March 2, 201412 yr Hi,Good day! I like to inform you that I like to move my new WP site from localhost to online server. So, I went to the online server and uploaded/backup my all files there. Then I created a new database and I tried to import my localhost database (wp.sql) there.But I got the following error massage:“ErrorSQL query:---- Database: `wp`--CREATE DATABASE IF NOT EXISTS `wp` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;MySQL said: Documentation#1044 - Access denied for user 'a8864920_root'@'localhost' to database 'wp'”So, please help me to solve this problem as well. No more, I am waiting for your kind response.Thank you. Edited March 2, 201412 yr by active-worker
March 2, 201412 yr Have you got a database on your live server called exactly 'wp'? Generally, the best thing to do is create a new database via cPanel, then export the tables from your localhost and import those, as opposed to the entire database. cPanel usually prefixes databases with your username, such as a8864920_wp, not just wp. Edited March 2, 201412 yr by andy9l
March 2, 201412 yr Author Hi,Thank you for your reply. I like to inform you that I have already created a database named "a8864920_another" in server and trying to import my localhost database there. Can you please tell me how I can successfully import my localhost database to my new created database named "a8864920_another" in server as well?No more, I am waiting for your kind response. Be well.
March 2, 201412 yr Sure: 1. Login to phpmyadmin on your localhost 2. Go into the 'wp' database so you can see the list of tables within 3. Click on export 4. Choose 'Quick' and then hit 'Go' 5. Login to your phpmyadmin on your host 6. Go into the 'a8864920_another' database 7. Go to 'import' and choose the .sql file you exported earlier That should work.
March 3, 201412 yr Sounds like you need to open up your sql file and remove the line that creates the table. I always prefix my tables with the standard wp_ Never ran into issues importing the full database before, it's quicker than exporting each table. You need to do a search and replace in the sql file: find anything beginning with http://localhost.. replace with http://yourservername...
March 3, 201412 yr Author Hi andy9l,Good day! I like to inform you that according to your advice I was tried to move my wp site from localhost to free online server (000 webhost) but failed.Then for testing, I just export database (a8864920_wp.sql) from 000 webhost. Then go to the localhost phpmyadmin and created a new database named "new_site". Then import it there. And I am wondered that it worked! Now I understood that 000 webhost is not allowed to import any database in free account.So, if you don't mind, can you please give me some free hosting sites address where allow to import any database in free account as well.No more, I am waiting for your kind response. Thank you. Be well. N:B: I use the same database for wp sites. I just change the table prefix their as well. Edited March 3, 201412 yr by active-worker
March 4, 201412 yr You should be able to import a database via phpmyadmin - 000 webhost themselves say it's possible. Can you post an example of your localhost .sql export? Use the [code ] tags and star **** the passwords. Edited March 4, 201412 yr by andy9l
March 5, 201412 yr Author Hi, please download from this link to see an example of my localhost .sql export: https://dl.dropboxusercontent.com/u/211935016/wp_to_localhost.zip Thank you.
March 5, 201412 yr try changing this line in the exported .sql file CREATE DATABASE IF NOT EXISTS `yoursite_wp` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE `yoursite_wp`; change both the yoursite_wp to whatever you've named your new database CREATE DATABASE IF NOT EXISTS `a8864920_another` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE `a8864920_another`; then import
March 5, 201412 yr Just take that line out! You've already created the database via cPanel, right? Take out the use statement too.
March 6, 201412 yr Author Hi, good day! I did the following things: 1. Change the statement form CREATE DATABASE IF NOT EXISTS `yoursite_wp` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;USE `yoursite_wp`; to CREATE DATABASE IF NOT EXISTS `a8864920_another` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;USE `a8864920_another`; in the exported .sql file. 2. Then try to import it at newly created database "a8864920_another" in the 000 webhost. 3. After click on "go", I just got nothing but a blank page. No more, I am waiting for your kind response. Thank you. Be well. Edited March 6, 201412 yr by active-worker
March 6, 201412 yr https://vimeo.com/88397675 Password: wdf It's currently processing...should be done in 45 mins. Edited March 6, 201412 yr by andy9l
March 6, 201412 yr I also use the 000 free servers, to upload a site I first go through all scripts and ensure there are no references to localhost. (Change any you have in the config files as well!!) Then I make a tar,gz file out of the site - login to 000 account ftp pages, and upload the tar.gz. There servers will (like most host's) automatically unpack everything to the directory structure it was in on your localhost, creating directories as you need them. When I have a mysql db to migrate I simply make sure the export files are saved in the root of the site before I tar it down. Then I use phpMyadmin to edit the files and import them. All takes about 30 mins with my slow connection and double checking myself as I go.
March 7, 201412 yr Author Hi guys, I am very happy to say that finally I move my site from localhost to server successfully . So, Thank you very much for all of your contributions and spending your valuable time. Here is the link of my site: http://my-portfolio-site.site88.net/html2wp/ I not only share my site to visit, but need a little bit advice from you. Please move bottom of the page where the images (3 images but same) are not loading properly. How to show them properly as well? No more, I am waiting for your kind response. Edited March 7, 201412 yr by active-worker
March 8, 201412 yr It took a while to get your page to load, it looks good. Your images are not loading because the have an absolute path of - src="http://localhost/html2wp/wp-content/themes/ultimate/images/promo_image.png" This needs to be changed to a relative path, or swap the 'localhost' server path to the new 000 web host path that your link points to thus - src="http://my-portfolio-site.site88.net/html2wp/wp-content/themes/ultimate/images/promo_image.png" (This is assuming you have the same directory tree.) Hope this helps. Edited March 8, 201412 yr by Weedy101
March 11, 201412 yr Author Hi Weedy101, Thank you so much for spending your valuable time for reply. I honestly say that nobody would ever tell me before about it like you. I am very glad and take it seriously as a result too. I hope you should continue help me and others in future as well.
March 12, 201412 yr Hi Weedy101, Thank you so much for spending your valuable time for reply. I honestly say that nobody would ever tell me before about it like you. I am very glad and take it seriously as a result too. I hope you should continue help me and others in future as well. Glad to help. To solve issues like that all you need is the developer panel on your browser. Most browsers have them - use '[crtl]+[shift]+i' on most browsers to open it and start exploring the mass of information and facilities it provides
Create an account or sign in to comment