-3

So I have built a WordPress site on local host using xampp now I'm trying to upload to the server however the style sheets, java script and pictures are not loading when i inspect element its still looking for it on local host i think get_template_directory_uri() is still pointing to local host how do i change it to face the new site

here is what it should look like

this is what it does look like

the url is http://live.homesmartenergy.co.uk/

I have tried to do a search and replace i used this website for the tutorial https://betterstudio.com/blog/search-and-replace-phpmyadmin/

and added the following to where it said to add it 
update TABLE_NAME set FIELD_NAME =
replace(FIELD_NAME, 'http://localhost/HomeSmartEnergy/', 'http://live.homesmartenergy.co.uk/');

however im getting this error

#1146 - Table 'markpric_wo3.TABLE_NAME' doesn't exist

i dont know where its getting that name from as my database is markpric_Homesmart2

crad98
  • 1
  • 5
  • [Something in my web site or project doesn't work. Can I just paste a link to it?](https://meta.stackoverflow.com/questions/254428/something-in-my-web-site-or-project-doesnt-work-can-i-just-paste-a-link-to-it) No, you can't. – tripleee Jun 09 '22 at 10:27
  • "TABLE_NAME" and "FIELD_NAME" are *placeholders* - you're supposed to replace them with the actual name of the table and field (column) that you need to update. As for the database name, I suspect you have *multiple* MySQL databases, and you need to look at which one you're connecting to. I would also advise you to **avoid running code without learning what it does**. You could easily mess everything up, or even be tricked into giving an attacker access. – IMSoP Jun 09 '22 at 11:13
  • ok im not looking to replace in one specific table im looking to replace across the whole database so what do i put instead of table_name and yh there are multiple databases in there im trying to not corrupt but this is all new for me and im the one to deal with this and im a bit lost – crad98 Jun 09 '22 at 11:20

1 Answers1

-1

Hey there i looked into your website and i can check that the url are not yet change from localhost(http://localhost/HomeSmartEnergy/) to your current url ( http://live.homesmartenergy.co.uk/). To do that you can change all your url with the new one or just download the database and open it with sublime and search for http://localhost/HomeSmartEnergy/, now replace all that urls with your current urls i.e http://live.homesmartenergy.co.uk/.

  • sorry im a bit new to this are you telling me to do a find and replace in phpmyadmin? ive looked into this and used this site https://betterstudio.com/blog/search-and-replace-phpmyadmin/ im going to update my question for you to show you what ive done – crad98 Jun 09 '22 at 10:55
  • ive managed to do the find and replace ive got the css loaded up however when i click on any links it goes to a 404 page – crad98 Jun 09 '22 at 12:15
  • This happens when you have done interlinking manually do change the url to the new url it will work. – parth patel Jun 09 '22 at 12:21
  • im going through the database i cant see any link to the old site what is it that i change heres my site so you can see for yourself whats happening http://live.homesmartenergy.co.uk/ – crad98 Jun 09 '22 at 13:07
  • its all good i just needed to save the permalinks and refresh the .htaccess file – crad98 Jun 09 '22 at 13:13