Bobcares

Temporary URL setup in DirectAdmin servers

by | Oct 9, 2014

My WordPress is broke after migration.
My WordPress links are not working.
I cant login to admin page!
My theme and stylesheet is all messed up!
WordPress site images are missing.

If you are a DirectAdmin webhost, you would recognize these support requests usually follow a WordPress site migration, a domain change or a new WordPress setup in a temporary URL.

Bobcares help desk support services routinely help web masters setup WordPress sites with minimal downtime. Below are a few common issues we’ve seen that cause WordPress site links to be broken.

Incorrect SITE URL

The configuration variable WP_SITEURL tells WordPress where the WordPress core files are located. We’ve seen that in the following situations the Site URL setting would be different from the actual WordPress path.

  1. When changing the status of an account from sub-domain to main domain or vice versa.
  2. When migrating a new site from development server to live server.
  3. When changing the domain name. When the primary reference URL changes, 
  4. When enabling SSL as the default mode. The Site URL by default would be using “http://”.
  5. When auto script installers like Softaculous uses primary domain name while installing WordPress on a temporary URL.
  6. When a temporary URL referenced through IP is made live.
  7. When transitioning the site from a sub-folder to document root folder or vice versa.

All the above situations cause a wrong domain name to be put in the Site URL path. This will cause broken links, redirects to old sites, redirect loops, broken images, broken themes and inability to login to WordPress. To fix it, either the database can be updated, or the WordPress configuration file can be updated. We usually edit the wp-config.php configuration file located in the WordPress root folder. Just make the following change to update Site URL.

Change
 define('WP_SITEURL', 'http://old-domain-path.com/wordpress');
 To
 define('WP_SITEURL', 'http://new-domain-path.com/wordpress');

Incorrect Blog URL

WP_HOME is the configuration setting that tells WordPress what the address bar URL should be. All the above situations that warrant a change in Site URL necessitate a change in Blog URL settings as well. Incorrect Blog URL settings result in broken WordPress login page, redirect loops, redirects to old sites, broken links and broken images. Since the admin page would be in-accessible, we resolve this issue by updating the wp-config.php configuration file as shown below:

Change
 define('WP_HOME', 'http://old-domain-path.com/wordpress');
 To
 define('WP_HOME', 'http://new-domain-path.com/wordpress');

Missing WordPress/Theme/Plugin files

Themes and plugins can affect how the entire site functions. We’ve seen that in the following situations, critical files of themes, plugins or WordPress core files do get missed out, which causes the entire site to break.

  1. Incomplete files upload/transfer – When uploading or transferring large sites, sessions sometimes break, and when a re-upload is attempted, critical files could go missing. Based on a comparative listing of source and destination, we get the list of missing files, which would then be used to update the site.
  2. Selective backup restores – Web masters sometimes try to selectively restore directories to roll back changes they have made to the site. This could result in old versions of files to be uploaded, or critical files to go entirely missing. We are usually able to restore such files from our weekly or monthly backup archives.
  3. Website intrusion – As we’ve covered earlier, stolen passwords and vulnerable WordPress versions are popular ways for hackers to take control of websites. In their attempt to inject malware, sometimes critical files get deleted. We are usually able to restore a safe website from daily backups.
  4. Aggressive anti-malware – Some servers set their anti-malware programs at “paranoid” setting, and this could cause valid theme or plugin files to be quarantined as malware. Malware logs show recent quarantines, and we white-list md5 signatures of files in popular WordPress themes and plugins to avoid such issues.

Incorrect permissions

As a rule, WordPress directories should have 755 permissions and files should have 644 permissions. When setting up a WordPress site with various themes and plugins, web masters are known to miss out on the required directory and file permissions. We quickly fix these issues by finding such directories through a find command and feeding that list into a chmod command.

Improper permalinks updates

Some web masters secure their .htaccess by write-protecting it, but WordPress requires that .htaccess be write-able by the web server when changing permalinks settings. When .htaccess is write protected, the site URLs would have changed, but the proper re-direction would not be present in the .htaccess file, causing the site to be broken. A WordPress site with custom permalinks setup should look like the following:

<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteBase /
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule . /index.php [L]
 </IfModule>

The above are the most common causes for broken links, broken themes, or broken login interfaces in WordPress websites, and we keep adding to the list as WordPress keeps evolving. In our help desk support services, we rely on systematic troubleshooting, that enables us to quickly and accurately resolve any WordPress issue reported by web masters.

Looking for a better help desk support experience for your customers? Check out our Help Desk support features below:

Take me there!

0 Comments

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF