0

TL;DR; social icons not showing on website that's an alias of another website.

Longer version:
My sister has made a wordpress website and I uploaded it for her because she couldn't work with ftp and such. I've followed a simple guide on going from a .com to a org wordpress site and it all worked pretty fine but I had to upload it to http://tsjevicom.webhosting.be/ because the domain tsjevi.com was still being transferred between 'Registrars' (not sure that's the word). So I also bought tsjevi.be and redirected requests from there and now did the same for tsjevi.com.

Problem is that the social icons tsjevi.com and tsjevi.be are not displaying correctly. I guess this is because it's looking them up trough a relative path and it can't find them from cross origin resources. I'd like to avoid installing the site again or diving too deep in how wordpress actually works so is there a simple solution for this?

Additional info
I just changed my A-records of tsjevi.be to those of tsjevicom.webhosting.be. And tsjevi.com automatically uses the same content as tsjevicom.webhosting.be. I did the installation part on tsjevicom.webhosting.be/wp-admin Afterwards I tried to change the site in the wp-admin gui to tsjevi.be but that resulted in the site not being accessible anymore so I looked up a bit and changed the end wp-config.php to:
/* That's all, stop editing! Happy blogging. */

/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(__FILE__) . '/');

define('WP_HOME','http://tsjevicom.webhosting.be');
define('WP_SITEURL','http://tsjevicom.webhosting.be');

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');

I think I only added define but I'm not sure anymore.

I just checked the database ad in wp_options I have:

option_name option_value autoload

siteurl http://tsjevi.be yes

home idem (no more than 2 links) yes

blogname Evi yes

  • if you didn't change the site url and home url in your database this is what will happen. Did you make that change? It's not always as easy as just changing them via myphpadmin. I don't have enough of what process you used to see what you may have missed. – rudtek Dec 28 '16 at 21:40
  • I tried to describe everything I did in my additional info part. If I need to provide any more info please mention what files I should show cause I'm not really familiar with wordpress. – turoni Dec 28 '16 at 22:02
  • are you comfortable with ftp? – rudtek Dec 28 '16 at 22:51
  • Yes, I'm good enough with coding and stuff to probably follow most things you say. I just don't know wordpress and don't want to learn it for a website I haven't developed and probably won't have to work with anymore. – turoni Dec 29 '16 at 9:47
0

I'm still not sure on the process you used, but here is what i suggest:

find out what plugin is using the social and re-install it.

TO AVOID WORDPRESS INTERACTIONS:

To avoid wordpress interaction and just make changes to the database, this is what i suggest:

start over with the process. (not completely necessary, you could try this from where you are right now. if it doesn't work, then restart.)

Put a clean backed up version of the old domain onto the new. if you haven't made any file changes besides the wp-config you can skip this. But you need to remove those lines you added before.

In your wp-config file just change db user, name, and pw to the right credentials to access your new database.

upload the sql of the old database into the new database.

You need to go into your new database and change the site url and home url to the new address. I suggest not doing this through phpmyadmin though as it will cause some problems as you've already seen or just by wp-config as you already tried.

Go get this tool: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

Upload it into your www/ folder. (I usually rename the search and replace folder to SRDB.)

now navigate to your new site with the SRDB at the end. (www.example.com/SRDB) and the top two lines you'll see a search field and a replace field. (if you get a db connection error here, double check the wp-config to ensure that it has the right credentials for your NEW SITE/DB). In the search place your old site address:

tsjevicom.webhosting.be ( Is this your OLD address or new? put the old here)

in the replace field place your new url tsjevicom.webhosting.org (make sure you enter your new site here.

ONLY do this after ensuring you're on your new url and that it's loaded into your new database: and you still have a backup of your sql in case something accidentally goes wrong.

hit live live run. let it run it's process

This should fix your problems! what it does is replace every instance/reference of your old site in the database to new one, including serialized data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.