I've got xampp up and running, copied the files of sikkesautomobielen.nl via FTP to my htdocs, connected my php database and have got my duplicate site working (localhost). When I click on one of the links on the site I still end up on sikkesautomobielen.nl instead of my localhost. I guess it's a database issue. Is there an easy way for me to make the URLs reference to localhost instead of sikkesautomobielen? I'm trying to develop a Wordpress site and when I'm done, I would like to upload it to the server. This way the site has a minimal down time and I can afford myself some mistakes without the "official" site crashing.
It's a database issue. Go to your database( PHPMyAdmin) and under *_options you will find 2 base urls, change them to your localhost url and the site will work.
Change the 'option_value' of both 'home' & 'siteurl'
'*' refers to your selected prefix
Related
I am working on a WordPress project, the job is to deploy everything from the old server to the new server.
So I downloaded everything from the old server.
I deployed a WordPress project to paid hosting, I deployed manually by pushing all the public_html folder to the server.
First, without a database connection, it was showing me a database connection error but after the database connection, it is showing me a hosting page instead of my WordPress project page.
How can I fix it and is there a configuration that needs to be fixed?
Kindly guide me and help me in this matter.
Also is it a domain configuration issue?
The domain is configuration is on the old server and I didn't set it up for the new server yet.
Thanks.
I faced similar issues yesteday when i tried to move my woocommerce exercise from localhost to my domain(live hosting),broken all links,images,routes etc ...There is no way to fix all that whithout paid plugins, maybe someone can go through whole db and change URL-s,i cant,and after that, the question remains whether I have problems elsewhere in the local WP code,who know where in code i also have embed "localhost" URL.
I cant give you solution but i must share my frustration with this tehnology which doesnt allow normall development process like 1)development -> 2)testing -> 3)deployment .
There is a site at my job that has only been maintained by 1-2 developers for a while but as more developers are being added to it we want to implement git. The workflow we're looking for has everyone using a local copy that is connected to the same remote database. We can all push and pull code as needed while any database changes would be shared that way.
I'm running into a weird issue where many files are refusing to load or clicking on any link results in a redirect to the xampp dashboard.
I downloaded xampp and created a directory in htdocs called local_test. I downloaded all the sites files into that directory with ftp. Grabbed the dbs info from the host and whitelisted the outside ip address on the host.
I went into wp-config.php and changes all the db values so it connect correctly. Plus I added:
define('WP_SITEURL', 'localhost/local_test/');
define('WP_HOME', 'localhost/local_test/');
At first I was convinced it was a db issue, but I can connect to the database remotely just fine using mysql workbench so I doubt it's that. The footer and the header show up, just not much of the content in between and like I said whenever I click on a link it redirect to the generic xampp dashboard.
I migrated from my local computer to my live server using Duplicator. When I switched over, my Wordpress Address (URL) was http://107.343.442.344 - my IP address - and the Site Address (URL) was http://nameofwebsite.com. Everything appears to be working just fine.
However, when I add an item to my cart and try to delete it, it doesn't remove the item. I check the console and there's a failed AJAX request. It's requesting information from http://107.343.442.344. So, I change the Site URL to http://107.343.442.344 and then the everything works just fine. However, now I can't go to my front page.
I tried making these changes to the database (WP-Options), but nothing works.
Does anyone know what I can do to correct the problem. I've contacted WooCommerce, but they're taking forever.
My site is not currently up, so you can't go to it.
Easiest way how to properly migrate your site from localhost to server:
Copy all your local site files to web server
Install and activate "WP Migrate DB" plugin to your local site, it's free and got all functionality you will need.
After "WP Migrate DB" activation you will find it under "Tools" > "Migrate DB". Open "Migrate DB", there will be empty "Replace" block with two fields which you need to fill (look at the picture below).
These two fields are only one you need to fill, after that click on "Export" button and plugin will download mysql database.
Login into your hosting cPanel (or any other webhosting management app if your hosting doesn't provide cPanel, for example, ISPconfig etc.) and create new database or replace old one with that which you just created with "WP Migrate DB" plugin.
Open and edit wp-config.php file on your public_html folder on webserver, replacing database name and other authentification credentials (change database name, database user and password which you created in cPanel) and save this file.
Done, enjoy. :)
i think you database is not migrate properly please try again with wp migrate db plugin or search replace file , if problem still appear then check the serve file and folder permissions
So I found out what the problem was. I was using VHS Host to redirect the IP address to my new server. Once I changed the nameservers to point towards my new server, it worked.
Thanks to everyone who posted a response. I really do appreciate it.
I'am new to the WordPress and I created WordPress website and configure it within the Wamp Server. The site displays all it's contains locally correctly. Now I want to access that website from the another machine within same network but it did not display all the contents correctly. it displays only the text. no images and the applied theme is not displays. I turn off the firewall and change the Apache configuration file (httpd.config) as follows. but it also didn't work properly. please help me.
Order allow, deny
Allow from all
The problem is that you specify during install that the hostname of the site is "localhost". Unofrtunately when you connect from another computer the link to "localhost" refers to the pc you are connecting from and since in this pc there isn't any server runnin,g you see only the text and not the images or the css.
The solution is to modify the wp-config.php wordpress file and change this from:
define('DB_HOST', 'localhost');
to:
define('DB_HOST', '192.168.0.4');
The problem is with URL of the site. You need to update the URL in database and replace localhost with IP of your machine using phpmyadmin and then that site will be accessible from other machines in your network. Please try this and it will solve your problem.
This is a WordPress oddity. When you install WP on localhost, or anywhere, it stores the url used in the install in its database. It then uses this url internally in its code to build links etc.
So when you come to run this site from another PC, things like image links will be built with the url localhost or localhost/wordpress.
Now when you run this from another PC using a different URL like 192.168.0.4/wordpress localhost will still appear in the links and of course there is no localhost on the client PC. So the links dont work. Its a bit like you have moved your site to a new url, but WP does not know about it.
Read this post on the WP Codex to work out what you need to so to amend the urls in the database. OF course this means you wont be able to use localhost anymore on the WAMPServer machine either.
I have created a WordPress project in my localhost, this is working.
I sent my project to git repository for hosting this in my VPS, I cloned the project in my VPS and imported my local database to remote database.
My Wordpress is hosting in remote, but why when I try access admin area with url hwsystem.com.br/wp-admin, this redirecting me to http://localhost/wp-login.php?redirect_to=http%3A%2F%2Fhwsystem.com.br%2Fwp-admin%2F&reauth=1 ?
How can I fix this problem?
I found where the problem is!
This problem is because I import database of my local database, where options_value of options_name in wp_options table is http://localhost, I just change it to my remote domain and is working.
When You move your files please login to your database and update the wp_options table site url and home url fields to your actual location.
Then login to the back end and update all permalinks
All done!
In your wp_options table in the MySQL DB, change the site url value to the remote site's domain name (i.e., hwsystem.com.br). It's most likely currently set to localhost You can also make this change within the admin interface, but seeing as you cannot access it, you'll need to change this value directly within the database.
Depending on your comfortability with MySQL, you can easily update this value with a SQL command, or use a GUI application such as HeidiSQL.
Moving a Wordpress website from localhost to online is not that simple, some times there are a lot of urls you have to change instead of only dealing with wp_options for example images path usually include the full localhost address.
The best and simplest way to make this right is by using this plugin: Duplicator
It will make any needed change it needs to happen, check it out.
You can also try to search and remove/replace localhost strings or anything else with this tool also https://github.com/interconnectit/Search-Replace-DB this works too.